if-else statements are another type
of conditional control statement. The format of an if-else statement is:
if (logical-expression)
{statements}
else
{statements}
where logical-expression is the condition
to be tested, and the first set of statements are the lines of code that are to be executed if the condition is
met. If the condition is not met, then the statements following else are executed.