Question: Rewrite the following code using if-else if instead of switch statement and find out the output. switch (n) 1 case 1: cout The number is
Rewrite the following code using if-else if instead of switch statement and find out the output. switch (n) 1 case 1: cout "The number is 1" endl; break; case 2: cout "The number is 2" endl; break; default: cout "The number is not 1 or 2" endl; break; \}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
