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 statement describes how to insert the IF, COUNTIF, or SUM function into a cell?
Gre4nikov [31]

Answer:

B Type an = sign in the cell, followed by the name of the function and the relevant arguments.

Explanation:

always look for =

8 0
3 years ago
How do I change my age on here?-<br> Why did it set it to 18???
zvonat [6]

Answer:

lol

Explanation:

go to edit profile

6 0
3 years ago
Read 2 more answers
an IPv6 packet has a 40 byte base header, a 20 byte destination options extension header (which is not used for routing) and 200
NISA [10]

Answer:

Explanation:

Given, total payload is: 2000 bytes

 MTU is: 1500 bytes

 Header is: 20 bytes

 Base header is: 40 bytes

Total number of fragments = Total Payload / MTU

                                            = 2500 / 1500

                                            = 2 fragments

Fragment     Base header    Fragmentation header     Authentication  

                                                                                                     header + Data

1                  40 bytes                  8 bytes                              20 bytes +772bytes

2                 40 bytes                   8 bytes                                 792 bytes

7 0
3 years ago
A random Interference that obscures a signal
wariber [46]

Answer:

noise because it is a random interference that obscures a signal.

7 0
3 years ago
You’re working on an image of you and a friend. You like the picture and want to have it framed. The picture is currently in ful
Rufina [12.5K]

What are the options? Please comment on this answer for me to help more. But my interpretation is either from the settings that pop up before you print or the settings in your printer.


6 0
3 years ago
Other questions:
  • Finding information on the web was made easier by _____________, which provide on-screen menus, making navigation of the web as
    12·1 answer
  • The button for adding a picture to a spreadsheet is found in the
    15·1 answer
  • ________ are used to translate each source code instruction into the appropriate machine language instruction.
    11·1 answer
  • What is the relationship between a method and a function
    11·2 answers
  • The computer system for a major retail store was hacked. Many addresses, credit card numbers, and other pieces of customers’ per
    7·2 answers
  • How do you debug an Xcode project?
    10·1 answer
  • HELP ASAP !!! What should be a one-page document?
    7·1 answer
  • Many web pages use a <br> structure to define an area of focus
    13·1 answer
  • 1. The running configuration is also known as the _____________ (Select Two) a. Startup config b. Working configuration c. Curre
    14·1 answer
  • Which is true for comments? Group of answer choices The compiler does not generate machine code for comments. The compiler conve
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!