Consider a vending machine that offers the following options:
[1] Get gum
[2] Get chocolate
[3] Get popcorn
[4] Get juice
[5] Display total sold
Design a program that continually allows users to select from these options. When options 1-4 are selected, an appropriate message is to be displayed acknowledging their choice. For example, when option 3 is selected, the following message could be displayed:
Here is your popcorn
The program terminates when option 5 is selected, at which point the total number of each type of item sold is displayed. For example:
3 items of gum were sold
2 items of chocolate were sold
6 items of popcorn were sold
9 items of juice were sold
If an option other than 1-5 is entered, an appropriate error message should be displayed, such as:
Error, options 1-5 only!