ExplanationThe variable ' x' contains the number of values correctly inputted by the user. If the
value of 'x' is three the addition and multiplication operations are performed as per first example
in the output. In the second example the numbers are not correctly entered. Hence, the i fcondition
is false and no operation is performed. Here, the statements are following if condition is enclosed
within curly braces.
5.3 THE if... else STATEMENT
We observed the execution of if statement in the previo ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.