CJCoding With Joseph
15free / daySign inCreate account

Really Quit

A menu: 1) Work prints Working..., 2) Quit asks Really quit? (y/n) and only leaves the loop, after printing Goodbye!, when the lower-cased stripped answer is y or yes; any other answer prints Staying. and the menu returns. Anything else at the menu prints Unknown choice - try again.. The confirmation read is written; add the decision. Input: one line per choice or answer; the last two lines are 2 and a yes. Prompts are part of the output, so Choice: and the question share a line with the message that follows.

Expected Output:

1) Work
2) Quit
Choice: Really quit? (y/n) Staying.
1) Work
2) Quit
Choice: Working...
1) Work
2) Quit
Choice: Really quit? (y/n) Goodbye!

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
Menus & Validation
📥 Auto-Input:
2\nn\n1\n2\nYES\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.