switch(exp)
{
case 1:
statement;
statement;
break;
case 2:
statement;
statement;
break;
case n:
statement;
statement;
break;
default:
statement;
statement;
break;
}
Explanation:
-An expression must evaluate to a value. The value of the expression is compared upon several cases in the switch case control structure.
-The case that matches the value of an expression, is executed.
-The break statement in each of the cases transfers the control of execution outside the switch control structure.
-The default option handles any mismatch in the control structure.