Question: 2. Convert the following switch-case code to an if-else code. 1 switch (n) 2 { 3 case 1: a == 1*n; 4 5 case
2. Convert the following switch-case code to an if-else code. 1 switch (n) 2 { 3 case 1: a == 1*n; 4 5 case 2: a = 6 2*n; break; 7 default: a ==> 0; break; 8 }
Step by Step Solution
3.47 Rating (147 Votes )
There are 3 Steps involved in it
The first case in the switch statement does not have a break sta... View full answer
Get step-by-step solutions from verified subject matter experts
