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

C programming
C programming Convert the following code to work with a switch statement.

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!