else… if Ladder: There is another way of putting 'if's together when multipath decisions are
involved. A multipath decision is a chain of 'if's' in which the statement associated with each else is
an if and last else if’s else part contain only else.
The conditions are evaluated from the top to bottom. As soon as true condition is found, the
statement associated with it is executed and the control is transferred to statement-x(skipping the rest
of ladder) when all the conditions become false, then the final else containing the default statement
will be executed.
Syntax:
if(condition-1)
Statement-1;
else if(condition-2)
Statement -2;
else if(condition-3)
Statement -3;
else if(condition-n)
Statement -n;
else
Default Statement;
Statement -x;