C++ If-else-if

C++ if.. else if Control Statement

In if.. else if control statement an if statement used with an optional else if control statement to check multiple conditions.

In this control statement when any one of condition returns true then none of the other else if or else will be executed.

Syntax

C++ if..else if Example

Output: