Compound block of Statements

Compound (Block of) Statements:
The if and if…else structures control only one statement at a time. Suppose, however, that you want to execute more than one statement if the expression in an if or
if…else statement evaluates to true. To permit more complex statements, C++
provides a structure called a compound statement or a block of statements. A
compound statement takes the following form:

That is, a compound statement consists of a sequence of statements enclosed in curly
braces, {and }. In an if or if …else structure, a compound statement functions as if it
was a single statement. Thus, instead of having a simple two-way selection similar to the
following code:

if (age >= 18)
cout << “Eligible to vote.” << endl;
else
cout << “Not eligible to vote.” << endl;
you could include compound statements, similar to the following code:
if (age >= 18)
{
cout << “Eligible to vote.” << endl;
cout << “No longer a minor.” << endl;
}
else
{
cout << “Not eligible to vote.” << endl;
cout << “Still a minor.” << endl;
}