Question 2) Write a user defined function called AdvancedMenu that simulates a menu with options the user can select. The function takes no arguments and does not return anything. The menu has the following options. 1. Blue Button Pressed 2. Green Button Pressed 3. Red Button Pressed 4. Yellow Button Pressed 5. Exit The user will select one of the four options and the program will display the option selected. If the user selects options 1-4, the program will ask the user to enter another option. If the user selects option 5, the program will not loop again. Hint: Use the switch statement and while loop.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section: Chapter Questions
Problem 9PP
icon
Related questions
Question

Q in picture

**C PROGRAMMING LANGUAGE

***PROVIDE COMMENTS

Question 2) Write a user defined function called AdvancedMenu that simulates a menu with
options the user can select. The function takes no arguments and does not return anything. The
menu has the following options.
1. Blue Button Pressed
2. Green Button Pressed
3. Red Button Pressed
4. Yellow Button Pressed
5. Exit
The user will select one of the four options and the program will display the option selected. If
the user selects options 1-4, the program will ask the user to enter another option. If the user
selects option 5, the program will not loop again. Hint: Use the switch statement and while loop.
Transcribed Image Text:Question 2) Write a user defined function called AdvancedMenu that simulates a menu with options the user can select. The function takes no arguments and does not return anything. The menu has the following options. 1. Blue Button Pressed 2. Green Button Pressed 3. Red Button Pressed 4. Yellow Button Pressed 5. Exit The user will select one of the four options and the program will display the option selected. If the user selects options 1-4, the program will ask the user to enter another option. If the user selects option 5, the program will not loop again. Hint: Use the switch statement and while loop.
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning