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
10y-50=<br> 10y−50=<br> \,\,-20<br> −20
densk [106]

Answer:

Therefore the value of 'y' is,

y=3

Step-by-step explanation:

Given:

10y-50=-20

To Find:

y= ?

Solution:

10y-50=-20    ........Given

Step 1. Adding 50 to both the side we get

10y-50+50=-20+50\\10y=30

Step 2. Dividing by 10 on both the side we get

\dfrac{10y}{10}=\dfrac{30}{10}\\\\y=3

Therefore the value of 'y' is,

y=3

6 0
3 years ago
Which function is invertible? select EACH correct answer.
Elden [556K]

Step-by-step explanation:

this two...? i think have a nice day!

5 0
2 years ago
11 pounds 13 ounces = ounces
lawyer [7]
1 pound = 16 ounces so let's go ahead and convert 11 pounds to ounces by multiplying by 16. 11×16=176 and then add 13 to that 176+13=189

so 12 pounds and 13 ounces= 189 ounces


6 0
3 years ago
What is the missing value?
madam [21]

the answer is 40

in

X 1 (+1) 2 (+1) 3 (+1) 4 (+1) 5

Y 4 (+9) 13 (+9) 22 (+9) 31 (+9) 40

3 0
2 years ago
Read 2 more answers
Sophia wants to solve for the side length of b. Which equation could Sophia use to solve for the side length of b, given the
Afina-wow [57]

Answer:

b² = a² + c² - 2ac cos B

Step-by-step explanation:

The cosine rule can be use when you are given three sides of a triangle and ask to find any angle or when you are given two sides and a included angles(the angle between the two sides given) and ask to find the length of a side.

The equation Sophia can use to solve for the side length(b) of a triangle when given two length and the included angle can be expressed below. Sophia was given two sides and an included angle and was asked to find a side length b.

For sides a, b and c the cosine rule can be represented below

a² = b² + c² - 2bc cos A

b² = a² + c² - 2ac cos B

c² = a² + b² - 2ab cos C

The equation required base on your question is

b² = a² + c² - 2ac cos B

3 0
2 years ago
Other questions:
  • Which expression can be used to find the value of X?
    15·2 answers
  • Find the measures of the supplementary angles of their measures are in ratio of 22:23
    10·1 answer
  • Dtermine whether the following value is a continuous random​ variable, discrete random​ variable, or not a random variable.
    6·1 answer
  • Write an equation in point-slope form of the line that passes through (-2,14) and is perpendicular to the line whose intercepts
    12·1 answer
  • Solve the system by substitution. (Please Explain how you did it Ill give brainliest)
    6·1 answer
  • WILL MARK BRAINLIEST
    8·1 answer
  • Heksnxhekakxbbsa SUSSY SUSSY <br> BOI IS HELLA SUSSSSSSSSSSS
    13·2 answers
  • The Fabric storage box below is shaped like a rectangular prism how much fabric is needed to cover the exterior of the box
    6·1 answer
  • In a quiz its just middle school work so PLS help me
    13·2 answers
  • Hello can someone help me with number 6 its the circled number <br> willing to give 30 points for it
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!