is there any real reason why some prefer one style over another whyle using them ? :
Code:
if (col == 1)
cout << '*';
else {
if (col == height * 2)
cout << '*';
else
cout << '0';
}
and the one below
Code:
if (col == 1)
cout << '*';
else if (col == height * 2)
cout << '*';
else
cout << '0';
the only diference in those 2 that i see is that in first one u can easy add a debug code or so, if the first "if" is false.
is that the only diference and reason that it could make to be better using that style ?(first seems a bit harder to folow but a bit easyer to modifi)