Question: Exercise 6: The following program uses a do.while loop to display a menu of three option(7and xl to the user. A switch statement is vsed
Exercise 6: The following program uses a do.while loop to display a menu of three option(7and xl to the user. A switch statement is vsed to display another message based on user selection Rum and test the program finctude tostrean int matn O char choice; do coutstin setece: oor frow the Foltoring List coutccn //add pre majors here coutss g7) Elecertcot Eng Antn eahel im cout si Hoon?cimschos ce; switch(chotce) casecout Code CHENOH breok Hacd more: cases here case 7coutss Code:ELECN: break case : break default coutss Invatid choice. Try ogatn N ) while (toloser(choice)!.x'); return e; mm//talaker converts r to.x' Now modify the above program so that the menu options are similar to the one displayed in the following screenshot. Also update the switch sttement to display the related maior code C AProgram FilesiMicrosot select Cheical Eng
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
