previous | start | next

The if Statement (Syntax 4.2 : Block Statement)

Syntax 4.2 : Block Statement

{   statement1
   statement2
   ...
   statementn
}
Example:
{
   double length = sqrt(area);
   cout << area << "\n";
}
Purpose: Group several statements into a block that can be controlled by another statement.


previous | start | next