C++ The else if statement - Multiple Selection(else-if) statement in c++

 


The else if Statement:

  • The else..if statement is useful when you need to check multiple conditions within the program.
  • Nesting of if-else blocks can be avoided using else..if statement. 

Syntax of else if statement:

The structure of else if can be defined as:
Syntax of else if statement

Example of else if statement:

Example of else if statement



Post a Comment

0 Comments