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
Scilla [17]
3 years ago
12

Consider the following switch statement where x is an int. If x is currently equal to 5, what will the value of x be after the s

witch statement executes? switch (x) { case 3 : x += 1; case 4 : x += 2; case 5 : x += 3; case 6 : x++; case 7 : x += 2; case 8 : x--; case 9 : x++
Mathematics
1 answer:
Sphinxa [80]3 years ago
3 0

Answer:

x=11

Step-by-step explanation:

The switch case works like an if or if-else, where each of the cases are conditionals. Here we have 7 cases and we know that our variable begins with x=5.

First, it enters to case 5 because of x=5, so x+=3, this means we add 3 to the actual value of the variable ⇒ x=8.  

At this point, if there's not break the program continues to the next case, executing the statements until a break or the end on the switch is reached.  

In this order, the x = 8 and next we add 1 (case 6) ⇒ x=9. We add 2 (case 7) x+=2 ⇒ x=10. Then we rest 1 (case 8) ⇒ x=9 and then we add 1 again as in case 9 ⇒ x=11.

You might be interested in
What numbers can be rounded to 360 when rounded to the nearest ten
mestny [16]
355, and any greater number that's less than 365, can.
4 0
3 years ago
Read 2 more answers
PLEASE HELP ASAP - ILL GIVE BRAINIEST
Mars2501 [29]

10. x*x + 10x + 21 = x + 3 * length

11. x*x + 2x - 8 = x + 4 * breadth

This is the expression bro!

100% sure

Plz mark me brainliest

7 0
3 years ago
Read 2 more answers
Please help to solve this ​
Lerok [7]

Step-by-step explanation:

I think it will help you.

The image above will help you

7 0
2 years ago
A doctor's office records data and concludes that, on average 11 out of 100 ( 11%) patients call to reschedule their appointment
Delicious77 [7]

Answer:

Step-by-step explanation:

B

6 0
2 years ago
15:40:25 in simplest form
Contact [7]

Answer:

the answer is 3:8:5

Step-by-step explanation:

This is because it says Apple, coconut, and orange, but you put orange, apple, and coconut

3 0
3 years ago
Other questions:
  • A nurse has an income of $120,000. The income tax the nurse has to pay is 6%. What is the amount of income tax, in dollars and c
    10·2 answers
  • ASAP please help me I don’t not know how to find the Y intercept from two points
    12·1 answer
  • What is the graph of the inequality? 4x + 2y ≤ 6
    10·2 answers
  • Jacob is tasked with the duty of selecting one name from a list of all employees in his company to award him or her and his or h
    13·1 answer
  • Use the distributive property to remove the parentheses. -8(-v(3)-3+6x(3)) The 3 in their own parenthesis are the power of 3
    12·1 answer
  • What are the values for s + m = 46
    11·1 answer
  • Multiply (3x – 1)(5x – 9) Show work Please
    11·2 answers
  • *Please Help!*
    14·1 answer
  • Fill in the table so it represents a linear function.
    8·1 answer
  • Suppose that there were a positive correlation between the variables u and v. If v is 24 when u is 10, which of these is most li
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!