WEEK 4 Flashcards
The inclusion of one or more if statements within an existing if statement.
Nested-if
This allows us to execute a block of code among many alternatives.
Switch Case Statement
You can do the same thing with the if…else statement. However, the syntax of this statement is much easier to read and write.
Switch Statement
The expression is evaluated once and compared with the values of each case label.
Switch Case Statement
If there is a match, the corresponding code after the matching label is executed. For example, if the value of the variable is equal to constant2, the code after case constant2: is executed until the ____________ statement is encountered.
Break Statement
If there is no match, the code after ____________ is executed.
default: