Just write the if keyword and then in some brackets, the condition. To specify the condition you simply write one value (either a variable or constant), then the comparison operator you want to compare them with (for example - equal to, which is ) and then the second value (either a variable or constant).
Jan 21, 2014 How to work with if-else-if statement in C. Visit my blog: Like my Facebook page: https://www.facebook.com/codeglympse.
C Nested if.else The if.else statement executes two different codes depending upon whether the test expression is true or false. Sometimes, a choice has to be made from more than 2 possibilities.
When I compile and run my programs in Dev C++, the output window opens and shows the output. Then instanlty the window flashes and disappears.
How do I make the window stay long enough for me to read the output??
Thanks
Dev C++ Download Windows 10
5 Contributors
forum 12 Replies
6,866 Views
2 Days Discussion Span
commentLatest Postby DuoasLatest Post
If Then In C
twomers408
If Then Dev C Online
The problem is (not really a problem), that the program is running too fast and doesn't have anything to stop it from closing. There are a number of options to solve this, most of them are mentioned here -- '>http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1043803465&id=1043284385 so if you're using C++ throw a cin.ignore(); and cin.get(); before you return 0; at the end of your program