Question: 2. The second version should display the same menu repeatedly using a while loop and print the appropriate message until the user wishes to quit.

2. The second version should display the same menu repeatedly using a while loop and print the appropriate message until the user wishes to quit. Use an if-else statement to test the users choices in the second version. Test your program, using two options from 1-4, inclusive, and then option 5 to quit. Capture screenshots of the output from your tests.

3. The third version be the same as version #2, except using a do-while loop instead of a while loop.

2. The second version should display the same menu repeatedly using a

#include int main () int selection; /lis an initial value necessary? printf ("options to select: "); printf ("1. Display Balance n") printf ("2. Withdraw Funds n" printf ("3. Deposit Funds n"; printf("4. Transfer Funds " printf ("5. Quit ") printf ("Enter your alestion (1-5): ") scanf("%d", &selection); switch (selection) case 1: printf ("You selected 1, Display Balance. ") case 2: printf ("You selected 2, Withdraw Funds.In") case 3: printf ("You selected 3, Deposit Funds.n") case 4:printf ("You selected 4, Transfer Funds. ") case 5:printf ("You selected 5, Quit. Goodbye!n" default: printf ("Sorry, you must select from 1-5. "); break break break break break; //end of switch /Tend of mai #include int main () int selection; /lis an initial value necessary? printf ("options to select: "); printf ("1. Display Balance n") printf ("2. Withdraw Funds n" printf ("3. Deposit Funds n"; printf("4. Transfer Funds " printf ("5. Quit ") printf ("Enter your alestion (1-5): ") scanf("%d", &selection); switch (selection) case 1: printf ("You selected 1, Display Balance. ") case 2: printf ("You selected 2, Withdraw Funds.In") case 3: printf ("You selected 3, Deposit Funds.n") case 4:printf ("You selected 4, Transfer Funds. ") case 5:printf ("You selected 5, Quit. Goodbye!n" default: printf ("Sorry, you must select from 1-5. "); break break break break break; //end of switch /Tend of mai

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!