Simple command-line menu

Using a while loop, create a simple command-line menu.

Note that this program lends itself well to actually being user-friendly.

It should prompt a user to enter a number corresponding to the item in the menu.

The program must have three selections with the following functions:

  1. Prompt for the user to enter two numbers and displays the sum
  2. Prompt for the user to enter their favourite food and then display:
    "Oh, I like [favourite food] too!" (or something similar)
  3. Display a 'bye!' message and exits the program

It is up to you if you wish to add more menu selections.

Try out the demo below, and enter different kinds of values to see how the program behaves.


--- Welcome to my program! ---
1. Addition
2. Favourite food
3. Quit
Enter your choice: