September 2011
Beginner
650 pages
15h 47m
English
A common programming construct that is based upon the nested if is the if-else-if ladder. It looks like this:

The conditional expressions are evaluated from the top downward. As soon as a true condition is found, the statement associated with it is executed, and the rest of the ladder is bypassed. If none of the conditions is true, the final else statement will be executed. The final else often acts as a default condition; that is, if all other conditional tests fail, the last else statement is performed. If there is no final else and all other conditions are false, no action will take place.
The following program demonstrates ...
Read now
Unlock full access