1. Exam Points
Nested if statementsNested if-else statementsNested if-else...if statementsNote:
- First check what a question asks.
inner if statement is evaluated only if outer if statement is true.- Check the outer if statements first, then the inner if statements.
- Ignore the if or else statements that will not be executed.
2. Knowledge Points
(1) Nested if Statements
Nested if statementsconsist of if, if-else, or if-else-if statements within if, if-else, or if-else-if statements.- Example 1: if inside if
- Example 2: if...else inside if
- Example 3: find the maximum among 3 variables.
- Example 1: if inside if