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
Serjik [45]
3 years ago
6

In the Happy Valley School System, children are classified by age as follows: less than 2, ineligible 2, toddler 3-5, early chil

dhood 6-7, young reader 8-10, elementary 11 and 12, middle 13, impossible 14-16, high school 17-18, scholar greater than 18, ineligible Given an int variable age, write a switch statement that prints out, on a line by itself, the appropriate label from the above list based on age.
Computers and Technology
1 answer:
sasho [114]3 years ago
5 0

// C++ switch

// It can also be used for JAVA, C#

switch(age){

// here age will be sent by the function in which it is used

// case to check the age<2

case(age<2 && age>0):

// printing the line

cout<<"ineligible";

// case to check the age ==2

case(age==2):

// printing the line

cout<<"toddler";

// case to check 3-5

case(age>=3 && age<=5):

cout<<"early childhood";

// case to check 6-7

case(age==6 || age==7):

cout<<"young reader";

//case to check 8-10

case(age>=8 && age<=10):

cout<<"elementary";

// case to check 13

case(age==13):

cout<<"impossible";

//case tocheck 14-16

case(age>=14 && age<=16):

cout<<"high school";

// case to check 17 or 18

case(age==17 || age==18):

cout<<"scholar";

//case to check >18

case(age>18);

cout<<"ineligible";

// default case

default:

cout<<"Invalid age";

}

Read more on Brainly.com - brainly.com/question/12981906#readmore

You might be interested in
Which extensions can help drive installs of your mobile app?
Iteru [2.4K]

The question above has multiple choices as follows.

<span>a.       </span>App extensions 

<span>b.      </span>Sitelink extensions

<span>c.       </span>Structured snippet extensions 

<span>d.      </span>RSLAs (remarketing lists for search ads)

The correct answer is (A) App extensions 


App extensions are a great way for people to access your website. They allow you to link to your tablet or mobile app from your text adds. If you want to drive app downloads, app promo ads might be the best option.

5 0
3 years ago
What need most led to the creation of the Advanced Research Projects Agency Network? DARPA wanted scientists to be able to colla
Bas_tet [7]

(A) DARPA wanted scientists to be able to collaborate and share research easily.

The initial purpose of ARPA was to enable mainly scientific users at the connected institutions to communicate and share resources, also to be able to link computers at Pentagon-funded research institutions over telephone lines, and it became the technical foundation of the Internet.

6 0
3 years ago
Read 2 more answers
1.which screen appears after the password is typed (welcome, lock)​
jenyasd209 [6]

Answer:

it should be the welcome screen I will hope so lol

4 0
2 years ago
Read 2 more answers
A spreadsheet is an interactive computer program used for
aksik [14]
Making charts, files that need complicated calculations
5 0
2 years ago
You are asked to write a program that will display a letter that corresponds with a numeric rating system. The program should us
Mice21 [21]

Answer:

rate

Explanation:

6 0
3 years ago
Other questions:
  • W jakim celu powstawały pieśni żołnierskie i partyzanckie?
    10·1 answer
  • . The first step in devising security services and mechanisms is to develop a security policy True False
    11·1 answer
  • Is it safe to tape down cords such as internet cables to the floor?
    14·1 answer
  • The larger the Word Size of a computer
    6·1 answer
  • The image below shows a weather service map
    13·1 answer
  • What is the purpose of a Post Mortem Review? (5 points)
    5·1 answer
  • Question #5
    14·1 answer
  • 4.7 Code Practice: Question 2
    7·1 answer
  • Luis saves an attachment that he received from Kevin. Where will the attachment save by default?
    5·1 answer
  • Please answer this question​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!