View Single Post
Old Feb 23rd, 2005, 9:47 PM   #6
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
Quote:
Originally Posted by gardon
no curly brackets after the if statements, so it produces the first output, which is the brown-carbon monoxide. Since it fulfills the if statement, the else if's are disregarded and the app terminates (or goes to another function in main, determining on what your program does).
If it's only one statement after the if statement, then it shouldn't require curly-brackets.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
Mjordan2nd is offline   Reply With Quote