≥
. Discuss what advantages each style has: A nested conditional statement is an if
or if else
statement inside another if else
statement.
Look back at the first two examples in the previous problem. Since the predicate expression a =
b will report true when they are equal and false otherwise, it's unnecessary to use the nested conditional statement in the first example, and the second example using the predicate inside the else
part is sufficient. Sometimes, however (especially when you aren't building a predicate), it can be helpful to use nested conditional statements.