March 2018
Intermediate to advanced
183 pages
2h 34m
English
Conditional statements are used to execute different code blocks based on different conditions.
The if statement will execute only if the expression inside the parentheses is evaluated to true. In C++, this does not have to be a Boolean expression. It can be any expression that evaluates to a number, in which case zero is false and all other numbers are true.
To test for other conditions, the if statement can be extended by any number of else if clauses.
The if statement can have one else clause ...