Question: C programming Convert the following code to work with a switch statement. char Choice; printf(Please enter your selection); Choice = getch(); if(Choice == ' 1
Convert the following code to work with a switch statement. char Choice; printf("Please enter your selection"); Choice = getch(); if(Choice == ' 1 ') printf("Selection is 1 "); else \{ if(Choice == '2') printf("Selection is 2"); else \{ if(Choice == ' 3 ') printf("Selection is 3 "); else \{ if(Choice == ' E ' || Choice = 'e') printf("Selection is exit"); else printf("Unknown selection"); \} \}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
