|
Flow chart of the sample program
|
The complete code of the program is given below.
|
|||||
|
In our program, we write a
single statement with the if condition. This
statement executes if the condition is true. If we want to execute more than
one statements, then we have to enclose all these
statements in curly brackets { }. This comprises a block of statements which
will execute depending upon the condition. This block may contain a single
statement just like in our problem. So we can write the if
statement as follow. if (AmerAge
> AmaraAge ) { cout << " Amer is older than Amara"; } |
||||||
|
|
Previous |
TOC |
Next |
|||