1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
leonid [27]
4 years ago
14

Assume that an int variable age has been given a value. 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 B: cheddar cheeseburger, steak fries, cole slaw (Yes, this menu really IS a menu!) Write some code that reads the string (S or T or B) that the user types in into a variable choice and 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 "cabernet", "chardonnay", and "IPA" for steak, trout, and burger respectively. Regardless of the value of age, your code should print "invalid menu selection" if the character read into choice was not S or T or B.
Computers and Technology
1 answer:
jeka57 [31]4 years ago
5 0

Answer:

No programming language stated.

I'll answer the question using C++ programming language

Explanation:

The code goes this;

.#include <iostream>

using namespace std;

int main()

{

string order; int age;

cout<<"Press S for hangar steak, red potatoes, asparagus"<<endl;

cout<<"Press T for whole trout, long rice, brussel sprouts"<<endl;

cout<<"Press B for cheddar cheeseburger, steak fries, cole slaw"<<endl;

cout<<"Please make your order";

cin>>order;

cout<<"Please what's your age";

cin>>age;

if(order == "S" || order == "T" || order == "B")

{

if(age <= 21)

{

if(order == "S")

{

cout<<"The Recommendation is Vegetable Juice";

}

else if(order == "T")

{

cout<<"The Recommendation is Cranberry Juice";

}

else if(order == "B")

{

cout<<"The Recommendation is Soda";

}

}

else

{

if(order == "S")

{

cout<<"The Recommendation is Cabernet";

}

else if(order == "T")

{

cout<<"The Recommendation is Chardonnay";

}

else if(order == "B")

{

cout<<"The Recommendation is IPA";

}

}

}

else

{

cout<<"Invalid Menu Selection";

}

return 0;

}

You might be interested in
Where is the start frame delimiter found in the Ethernet frame
Ksju [112]
Answer: The SFD is the eight-bit (one-byte) value that marks the end of the preamble, which is the first field of an Ethernet packet, and indicates the beginning of the Ethernet frame.
8 0
3 years ago
Can anyone help me ?
IrinaVladis [17]

Answer:

System.out.printIn("Hello, world" );

Its " ); " and not " ) ; "

5 0
2 years ago
Advantages of ASCII over EBDCDIC​
KiRa [710]
<h3>Efficiency. Moreover, the same character in ASCII requires 7 bits, but EBCDIC required 8 bits. Therefore, ASCII is more efficient than EBCDIC.</h3>

7 0
3 years ago
Which of the following terms means to take notes from a resource in your own words
Elan Coil [88]
Paraphrase is the correct answer
8 0
4 years ago
Read 2 more answers
Tools such as microsoft's word, excel, and powerpoint are examples of ________ software. question content area bottom part 1 a.
Leona [35]

Tools such as microsoft's word, excel, and PowerPoint are examples of Application software.

<h3>What is Application Software?</h3>

Application software exists as an end-user program typically separated into two classes: application software and systems software. Systems software delivers an operating system and utilities that allow applications software such as database programs, spreadsheets, web browsers, and more to run.

The most common examples of application software stand the computer programs that we utilized in our everyday life. This application software includes Microsoft products such as Office, PowerPoint, Word, Excel, Outlook, etc. Music Application Software like Pandora and Spotify.

Types of Application Software

  • Web browsers.
  • Presentation software.
  • Spreadsheet software.
  • Graphic software.
  • Word processors.
  • Database software.
  • Multimedia software.
  • Education software.

Hence, Option e Application Software is correct.

To learn more about Application Software refer to:

brainly.com/question/25704037

#SPJ4

3 0
2 years ago
Other questions:
  • The pseudoinstructions that are available in an assembly language programming environment usually found in the Select one: a. CP
    6·1 answer
  • Universal Containers is implementing a community of High-Volume Community users. Community users should be able to see records a
    12·1 answer
  • Engineers involved in product design and manufacturing use computer-aided design/computer-aided manufacturing (CAD/CAM) systems,
    13·1 answer
  • For this lab you will do 2 things:
    14·1 answer
  • Presentation graphics programs contain an assortment of tools and operations for creating and editing slides, including preforma
    8·2 answers
  • Based on the following passage on construction technology during the Middle Ages, why might a worker not be allowed to join a gu
    15·1 answer
  • Write a program that will generate a personalized invitation within a text file for each guest in the guest list file using the
    15·1 answer
  • NEED HELP
    9·1 answer
  • MATH PLZ HELP ITS DUE IN 4 MINUTES​
    6·2 answers
  • What does ""fair use"" mean regarding copyrighted works?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!