Ask Question

In the Happy Valley School System, children are classified by age as follows:

less than 2, ineligible

2, toddler

3-5, early childhood

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 the appropriate label from the above list based on age.

+3
Answers (1)
  1. 1 June, 10:38
    0
    switch (age) age==7):

    cout<<"young reader";

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

    cout<<"elementary";

    case (age==13):

    cout<<"impossible";

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

    cout<<"high school";

    case (age==17
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “In the Happy Valley School System, children are classified by age as follows: less than 2, ineligible 2, toddler 3-5, early childhood 6-7, ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers