> Why use the "else if" if you can just put another "if" statement in there?
The else if construct stops when the first true condition is found.
If the grade was 'b', then using else if, the grade == 'c' comparison is skipped, because a successful match was made.Code:if ( grade == 'a' ) else if ( grade == 'b' ) else if ( grade == 'c' ) Against if ( grade == 'a' ) if ( grade == 'b' ) if ( grade == 'c' )