- The basic syntax of if in C/C++ is as follows:
if (condition)
{
// Some commands...
}
The meaning is that if the condition is satisfied, then the commands within
the curly braces get executed.
Of course there are other variations in this if construct.
Let's look on at this in action.
|