Nested-if Statement With Example
Nested-if Statement ?
The statement executed as a result of an if statement or else clause could be another if statement. These are called nested if statements. An if statement inside another if or else statement is termed as nested-if
A nested if is an if statement that is the target of another if statement. Nested if statements means an if statement inside another if statement.
It is always legal to nest if-else statements, which means you can use one if or else if statement inside another if or else if statement(s).
i is smaller than 15 i is smaller than 12 too
X = 30 and Y = 10
aimtocode roll no is 20