So lets here about it and why do you prefer this method of indentation?
if (expression) {
statements
}
if (expression)
{
statements
}
if (expression)
{
statements
}
the above mentioned ways seem to be the most common I came across and I notice different programmers prefer different ways from my experience.
Personally I prefer the top two depending on the situation. Most commonly I will use the top if statement - to me it is more readable and cleaner looking.
Sometimes I prefer to write my code this way.
#include <iostream>
using namespace std;
int main()
{
int a = 1, b = 1, c;
if (c = (a - b )) {
cout << "The value of c is: " << c;
return 0;
}
So lets discuss.
This post has been edited by Nykc: 19 July 2008 - 09:06 AM

New Topic/Question
Reply



MultiQuote






|