 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
• |
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;
|
|
|
}
|
|
|
|
|