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
Use the following data definitions data myBytes BYTE 10h,20h,30h,40h myWords WORD 3 DUP(?),2000h myString BYTE "ABCDE" What will
Elena-2011 [213]

Answer:

<em>Given Data:</em>

<em>myBytes BYTE 10h, 20h, 30h, 40h </em>

<em>myWords WORD 3 DUP(?), 2000h </em>

<em>myString BYTE "ABCDE"</em>

<em />

Based on the data that we are given we can conclude that:

(a).     a. EAX = 1

         b. EAX = 4

         c. EAX = 4

         d. EAX = 2

         e. EAX = 4

         f. EAX = 8

         g. EAX = 5

8 0
3 years ago
Tablets combine the features of which two types of devices?
VikaD [51]
A tablet<span> is a wireless, portable personal computer with a touchscreen interface. The </span>tablet<span> form factor is typically smaller than a notebook computer, but larger than a smartphone.
</span>
5 0
3 years ago
14. Blender® does not typically use pop-up boxes. (1 point)
ivolga24 [154]
Hey buddy 

so 14 it was be a long time but l think it is true 

15 is <span>the range of tools and functions associated with that activity</span>
5 0
3 years ago
The last time period the federal government of these United States ran a budget surplus was ________.
lina2011 [118]
Your answer is a 1998-2001
3 0
3 years ago
A = 250; B = 325. which of the following statements is true? A ==B A&gt;B A =B
Feliz [49]

Answer:

It should be A<B

Explanation:

250 is less than 325

5 0
3 years ago
Other questions:
  • The Internet of Things (IoT) is a concept with emphasis on machine-to-machine communications to describe a more complex system t
    10·1 answer
  • Where can you find gradpoint answers
    13·2 answers
  • Live.com is Microsoft's free web-based email provider.<br> A. True<br> B. False
    6·1 answer
  • Define a romanNumberToInt function that converts a RomanNumber value, which is a list of Roman digits, into an integer. Hints: -
    7·1 answer
  • Hey does anybody know how to delete history on a school-issued chrome book, I tried to delete it but it won't let you clear your
    7·1 answer
  • _____ is when a person connects their location to photos that are posted online.
    5·2 answers
  • Good keyboarding technique includes ________
    7·2 answers
  • 10010 - 1011 binary subtraction​
    5·1 answer
  • Which 2 processes are operational processes
    10·1 answer
  • when inputting a formula into excel or other spreadsheet software, what components are required for the formula to function prop
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!