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]
3 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]3 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
Matt is a senior developer for Cyber Protect, a company that helps secure management information systems. Matt's new task is to
Len [333]

Answer:

white-hat hacker

Explanation:

The white-hat hacker is also called as ethical hacking. The white hat hacker is the security of the computer in an ethical manner by some experts it specializing in system testing and other test modules of computer is to ensure the security of the information security of an organization.

As Matt is a  developer for protecting the Cyber in a company The Matt creates secure management information systems. it divides the new task into the computer So Matt is a white-hat hacker in that organization

4 0
3 years ago
You are a domain administrator for a large domain. Recently, you have been asked to make changes to some of the permissions rela
Lisa [10]

Explanation:

Since the Austin OU (organization unit) is a descendant of the Texas OU, it naturally inherits the permissions from its parent/ancestors.

Any restriction (permissions removed) from the Texas OU will be inherited onto the Austin OU.  This is exactly the intended purpose of organizing groups in OU's because all changes will automatically inherited within the OU without having to work down the tree.

This can be confirmed by checking with other cities to see if they too have the same restriction.

The proper way the request should have been done is to apply the changes to the most specific unit possible, be that OU's, groups, etc.

7 0
2 years ago
How is the internet made?
sergey [27]

The Internet was made for shopping, searching. It was first made when the computers came out. (Windows Vista) Now you can watch videos or play games. The internet was main browsing and shopping. The internet today is really advanced and has made it was to phones and TVs. The internet wasn't the first thing you can do on the computer, you could write up a paper or do a slide show.

The Internet was created by Bob Khan and Vint Cerf. The Internet is like a big Tree. The websites are the bushes and the branches are the makers of the website. The internet today just a bunch of makers who make websites that you can access through the internet. If there were no websites there would be no internet. So if the internet quits (The Internet cant) Google and other big websites will be shut down. So the internet is a home for all the websites we use today.

This is really long but I tried not to make it so complicated and sound like I didn't copy and paste. I really hope this helped you in someway and Your Welcome. :)

8 0
3 years ago
What do you mean by HDML coding ​
castortr0y [4]

Answer:

hdml coding is a standard markup language for documents designed to be displayed in a web browser.

Explanation:

it can be assisted using things like CSS or JS

8 0
3 years ago
What are some positive impacts technology has on the environment?​
dsp73

Answer:

<u>technology</u> has enabled us to capture useful heat through devices such as solar panels

Explanation:

<h3 />
7 0
2 years ago
Read 2 more answers
Other questions:
  • Which social networking function came first?
    9·2 answers
  • Two electronics students are discussing static electricity and electric current. Student A says that a basic property of static
    12·1 answer
  • What is the last step in conducting url search
    11·1 answer
  • Can someone please help??
    12·1 answer
  • Someone who is young, lacks funds, and really wants to gain technical skills while serving his or her nation should consider
    8·1 answer
  • Explain the factors involved in selecting a routing protocol to be used on a network.
    12·1 answer
  • Visual imagery encoding relates to _____ encoding, in that a person is connecting the new information to previously existing inf
    11·1 answer
  • You have been handed a mysterious piece of data by an unknown person. Judging by his shifty eyes and maniacal laughter you don't
    12·1 answer
  • PLZZZZZZZZZZZZZZZ HELP ME OUT!!!!! I SICK AND TIRED OF PEOPLE SKIPING MYQUESTION WHICH IS DUE TODAY!!!!
    14·1 answer
  • What is the purpose of a hyperlink in a presentation?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!