Electrical and Computer Engineering
19 of 21
UAH
CPE 112
Block Statements
•Anywhere one statement can be used, a series of statements can be used, they must be enclosed in braces {}.
•Example:
•   if (divisor != 0)
•   {
•     result = dividend / divisor;
•     cout << “Division performed.” << endl;
•   }
•   else
•   {
•     cout << “Division by zero is not allowed.” << endl;
•     result = 9999;
•   }
•