Don't you hate it when people indent their code like this?
template
<class C>
C*
v_DoSomething ( C a,
C b,
C c )
{
C* _ptrResult = &a;
if ( a >= b )
{
return ( _ptrResult );
}
else
{
if ( b >= c )
{
return &c;
}
else
{
return _ptrResult;
}
}
}
Looks readable to me, but I wouldn't use all those blocks with single statements, looks way too verbose, in general, that code is way too verbose. Also you forgot your code tags.
int
main
(
void
)
{
int i;
for
(
i = 0;
i < 5;
++i
)
{
if (i == 0)
{
puts("0");
}
else if (i == 1)
{
puts("1");
}
else if (i == 2)
{
puts("2");
}
else if (i == 3)
{
puts("3");
}
else if (i == 4)
{
puts("4");
}
else
{
puts("5");
}
}
return 0;
}