Cool. Now we describe one case:
You can see that the
a variable is greater than 10, and other messages (
greater than 5 and
greater than 0) make no sense.
You cannot just use the
else statement because this case has few conditions.
else if construction provides a possibility to choose one block of execution:
Now we have a chain of conditions built, which is interrupted when at least one
This structure is useful when only one condition needs to be satisfied.