Question: C programming the second picture results shows what is supposedly wrong PREV NEXT ercise 10370 X Workbench deadline 02/14.2 WORK AREA RESULTS Assume that an

 C programming the second picture "results" shows what is supposedly wrong

PREV NEXT ercise 10370 X Workbench deadline 02/14.2 WORK AREA RESULTS Assume

C programming the second picture "results" shows what is supposedly wrong

PREV NEXT ercise 10370 X Workbench deadline 02/14.2 WORK AREA RESULTS Assume that an int variable age has been declared and already given a value and assume that a char variable choice has been declared as well. Assume further that the user has just been presented with the following menu: S: hangar steak, red potatoes, asparagus T: whole trout, long rice, brussel sprouts Bi Cheddar cheeseburger, steak fries, coleslaw (Yes, this menu really is a menul) Write some code that reads a single character (S or Tor B) into choice. Then the code prints out a recommended accompanying drink as follows: If the value of age is 21 or lower, the recommendation is vegetable juice for steak, "cranberry juice for trout, and "soda" for the burger. Otherwise the recommendations are abernet chardonnay" and "IPAfor steak, trout, and burger respectively. Regardless of the value of age, your code should print "invalid menu selection in the character read into choice was not sor Tor B. SUBMIT IO 10: 2021-02-10 21 WW if (choice --Il choice --Il choice --') if (age 21 if (choice ) cout a vegetable Juices IF (choice 15) cout "cabernet r choice - te cout 2 int main() int age; 4 char choice; 5 6 if (choice -- 'S' Il choice -- Il choice -- B') 3 if (age ( 21 ) 9 10 if (choice --> 11 cout 1s cout > 22 cout

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!