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
You are the network administrator for a small company that implements NAT to access the internet. However, you recently acquired
aleksklad [387]

Answer: Static

Explanation:

Network Address Translation is simply designed for the conservation of IP address. It allows private IP networks which makes use of unregistered IP addresses to be able to connect to the Internet.

Static Network Address Translation enables port number translatation and IP addresses from inside to the outside traffic likewise from the outside to the inside traffic.

3 0
3 years ago
Please Help Fast!!!!!! Brainliest for First to answer!!! Conflict resolution is the process of solving disputes and disagreement
MaRussiya [10]
It's true............
8 0
3 years ago
The law that says you must submit to a test for the presence of alcohol or drugs is known as the
ELEN [110]
This is called<span> the "implied consent" </span><span>law</span>
7 0
3 years ago
Read 2 more answers
The benefits associated with software reuse are lower cost, better quality,
Sholpan [36]

Answer:

Software reuse is the technique through which updating the software system through the already defined components or assets of the software.This helps in increasing the productivity ,cost decrement , quality improvement etc.

But in actual case, the software reuse still persist high cost due to modification of inflexible designing of software .It also costs more than expected for the maintenance and training of software.

The security of the software is always at risk because of the usual and advanced hacking and attacking by the hackers even when the protect of software is high.Thus, these statements verify that the benefits of cost and security of software is not actually realized.

6 0
3 years ago
25 points!!!!!!!!!!!!!!!!!!!!!
Wittaler [7]

Answer:

thank u appreciate it

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Shannon has been a member of her schools newpaper club for 2 years and attends writing workshops in her free time. Which career
    11·1 answer
  • Why does fiber optic communication technology have a significant security advantage over other transmission technology? higher d
    6·1 answer
  • The _______ "represents a set of features that enables the user to inform himself whether a security feature is in operation or
    8·1 answer
  • You can use pen and highlighter tools to emphasize information on a slide during a PowerPoint presentation. These tools are avai
    11·1 answer
  • For a typical middle-income family, what is the estimated cost of raising a child to the age of 18?
    11·1 answer
  • Explain motherboard in detail
    14·2 answers
  • Assume you have a subdirectory named datafiles directly under your current working directory, and you have two files named data1
    7·1 answer
  • In 200 words or more, please describe the Cyber Security Enhancement Act. Include when it was implemented and what it's purpose
    12·1 answer
  • Where ....................... the books that you borrowed? *
    5·1 answer
  • Expectation on Information Technology Fundamental​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!