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
Mrs Duncan measured the length of a crayon and a pencil the pencil is double the length of the crayon. The sum of their lengths
777dan777 [17]
24 divide by 3 is 8
The crayon is 8cm
The pencil is 16cms
6 0
3 years ago
What figure is a dilation of Figure A by a factor of 2?
stepan [7]

Answer: Bottom Right

Step-by-step explanation:

Since the scale factor is 2 all the lengths of the original should be multiplied by that scale factor. Don’t fall for the top left because 2•4 doesn’t equal 6. The top right is just completely off. The bottom left is if the factor is .5

7 0
3 years ago
Help me!!!! Pleaseeee
mariarad [96]

Step-by-step explanation:

<u>Y2 - Y1</u>

X2 - X1

<u>3 - 1</u>

2 - 1  

= 2

y - Y1 = m (x - X1)

y - 1 = 2(x - 1) --- IN POINT SLOPE FORM

y - 1 = 2x - 2

 + 1          + 1

y = 2x - 1 --- IN SLOPE INTERCEPT FORM


QUESTION 12:

Slope intercept form -

  • y = mx + b
  • m represents the slope
  • b represents the y - intercept AKA the starting point
  • When the slope is negative, you go down
  • When the slope is positive, you go up

ABOUT PROBLEM:

  • Since the slope is negative, you go down 4, right 3, but start from the 2 then start doing the slope
  • You have to put 2 on the y - line because it's the y - intercept AKA starting point

y = -4/3x + 2


4 0
3 years ago
What is the value of n
AnnZ [28]
It's N=9 it's really confusing but trust me it N
8 0
3 years ago
Read 2 more answers
5. A baseball player earns $2,913 for each game
ser-zykov [4K]

Answer:

471,906

Step-by-step explanation:

5 0
3 years ago
Other questions:
  • A ball is thrown in the air from a ledge. Its height in feet is represented by f(x) = –16(x2 – 7x – 8), where x is the number of
    10·2 answers
  • What is 0.685714285714 in a simplified fraction?
    14·1 answer
  • An exponential function is written as F(x) = a • bx, where the coefficient a is a constant, the base b is _____ but not equal to
    6·2 answers
  • Trey's truck has a 80 gallon tank. The fuel gauge points to . How much fuel does he need to fill that tank?
    7·1 answer
  • ∠1 and ∠2 are supplementary angles. m∠1 = x − 39, and m∠2 = x + 61. Find the measure of each angle.
    6·1 answer
  • A cylindrical candle has a diameter of 9 cm and height 12 cm.
    8·1 answer
  • 3(x + 4) − x &gt; 4 <br> lol i dont know the answer
    15·1 answer
  • Whats the fraction as a whole number of 9/12??
    8·2 answers
  • What’s the volume for the rectangular prism
    10·1 answer
  • Giving away points, because I'm leaving :3
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!