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
4
kupik [55]

Answer:

the answer is D Smart Object

5 0
3 years ago
Read 2 more answers
Which is an example of synchronous communication. Text message e-mail voicemail telephone conversation
enot [183]

Answer:

Text Messages

Explanation:

Synchronous communication is a simultaneous communication between two people. This is the type of serial communication where two person can communicate at the same time. This type of communication exclude face to face communication and phone communication.

for example

during Chat when we are taking to someone he also can reply the same time.

3 0
3 years ago
Read 2 more answers
15. Select the correct answer.
givi [52]

Answer:

Pixel dimensions

Explanation:

measure of height and width of a image in pixels

3 0
3 years ago
PowerPoint displays a few themes that are similar to one another.
Naya [18.7K]
"Powerpoint displays a few themes that are similar to one another", this statement is true. Sometimes, the theme is accompanied of pictures and graphics which are also similar to one another. This theme represents the document that you want to present and submit. Sometimes also, the theme represents the personality of the creator.
3 0
3 years ago
Read 2 more answers
What do dns servers use to help resolve ip addresses to dns names?
VladimirAG [237]
PTR records. Normal job of DNS is the other way around, ie., dns name to ip address. Pointer records are for reverse DNS.
6 0
4 years ago
Read 2 more answers
Other questions:
  • How to write equal to or greater than in word?
    9·1 answer
  • You will need to complete the functions these functions: a. get_total This function takes in pennies, nickels, dimes, and quarte
    11·1 answer
  • What is returned by datetime(1970, 1, 1).strftime('%Y-%d-%B') in Python?
    10·1 answer
  • Do the police check your mobile device during police checks?
    10·2 answers
  • Addition and subtraction are considered to be ____ operations performed by a computer.
    7·1 answer
  • How do assembly language different from machine language?
    15·1 answer
  • What will be the result of running the following code fragment? int year = 0; double rate = 5; double principal = 10000; double
    14·1 answer
  • Briefly explain why corporations are increasingly interested in using Unix or Linux for their operating systems.
    5·1 answer
  • Is my document folder located at taskbar​
    12·1 answer
  • What you can do with the custom shape tool?​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!