Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
- 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started