Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The following segment displays the menu and will show the price to be paid based on the choice entered. There are some syntax errors and
The following segment displays the menu and will show the price to be paid based on the choice entered.
There are some syntax errors and missing instructions. Correct the errors and add the related
instructions so the segment can be executed
char pick; //input for menu
float price = 0
;cout
cout
;cout
cout
.:":cout
.": cout
;cin >> pick
switch (choice)
choice "1
;cout
price = 9.50
;break
choice '2
;cout
"choice '3
;cout
price = 12.90
"choice '4
;cout
else
cout
;cout
The following segment displays the menu and will show the price to be paid based on the choice entered. There are some syntax errors and missing instructions. Correct the errors and add the related instructions so the segment can be executed char pick; /linput for menu ,float price =0 ;cout "1. Fried rice" endl ;cout "2. Spaghetti bolognese " endl ;cout "3. Mac n cheese" endl ; cout "4. Burger" endl ;" : cout "Please make a choice of your favorite mealStep 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