C++ switch statement

A switch statement is used instead of nested if…else statements. It is multiple branch decision statements. A switch statement tests a variable with a list of values for equivalence. Each value is called a case.
The case value must be a constant integer.

Structure of switch() statement :


The following result is :-