Question: Write a C++ program that asks the user the questions from the Deciding what to have for lunch? flow chart and displays the appropriate message

Write a C++ program that asks the user the questions from the Deciding what to have for lunch? flow chart and displays the appropriate message to the user.

  1. The user should be prompted to ask the first questions in the diamond on the flow chart and asked to respond with

    a Y or y for Yes and

    a N or n for No

    or

    a A or a for A lot and

    a B or b for Not much

    (depending upon the question).

    • If the user enters a valid option the corresponding path on the flow chart is followed.
    • Otherwise, the user is told that they entered invalid data and asked to run the program again.

Once you reach the end of the path on the flow chart (a yellow rectangle), the message at the end is displayed to the user and the program ends.

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 Databases Questions!