Question: C + + programming LAB 5 . 6 Student Generated Code Assignments Option 1 : Write a program that performs a survey tally on beverages.

C++ programming LAB 5.6 Student Generated Code Assignments
Option 1: Write a program that performs a survey tally on beverages. The
program should prompt for the next person until a sentinel value of -1 is.
entered to terminate the program. Each person participating in the survey
should choose their favorite beverage from the following list:
Coffee
Tea
Coke
Orange Juice
Sample Run:
Please input the favorite beverage of person #1: Choose 1,2,3, or 4 from the
above menu or -1 to exit the program
4
Please input the favorite beverage of person 2: Choose 1,2,3, or 4 from the
above menu or -1 to exit the program
1
Please input the favorite beverage of person #3: Choose 1,2,3, or 4 from the
above menu or -1 to exit the program
3
Please input the favorite beverage of person # 4 : Choose 1,2,3, or 4 from the
above menu or -1 to exit the program
1
Please input the favorite beverage of person #5: Choose 1,2,3, or 4 from the
above menu or -1 to exit the program
1
Please input the favorite beverage of person #6: Choose 1,2,3, or 4 from the
above menu or -1 to exit the program
-1
The total number of people surveyed is 5. The results are as follows:
C + + programming LAB 5 . 6 Student Generated

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!