006-004-011
Menu Selection Loop with do-while
Hard
Problem Description
Menu Selection Loop with do-while
In this problem, you will create a program that reads integer inputs, outputs the corresponding action name for each, and repeats using a do-while loop until 3 is entered to exit.
Learning Objective: Understand implementing an interactive menu with do-while
Overview
Create a program using do-while that processes menu selections and repeats until exit is chosen.
Specifications
- No menu display needed (just accept input)
- Input
1: printAction: Add - Input
2: printAction: Delete - Input
3: printGoodbye!and exit loop - Other: print
Unknown option
Input Example
1
2
4
3
Output Format
Action: Add
Action: Delete
Unknown option
Goodbye!
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up