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
I need help with Algebra 2. Thank you! :)
andre [41]

Answer:

B: 6.0

Step-by-step explanation:

-3t^2+9t+54 = 0

This is the equation that needs to be solved

Divide both sides by -3

t^2 - 3t - 18 = 0

The factors of 18 are: (1 18) (2 9) (3 6)

3 - 6 = -3 and 3 x -6 = -18

So: (t + 3) (t - 6) = 0

t = -3, 6

It can't be negative so the answer is 6

7 0
3 years ago
-(-(-)(-)(-10x))=-5 solve for x
ElenaW [278]
-(-(-)(-)(-10x)) = -5

We need to cancel out the negatives, so we need to simplify this.

To make things a bit easier for you, we can begin by counting out how many negatives we have. After counting, you should have a negative number count of 5. However, one of the negatives is apart of (-10x) so we'll have 4 negatives and then an extra negative in with 10x.

Remember that "-" could also be looked at as "-1."

So, if we break this down into smaller parts and substitute "-" into "-1," then this'll look like this :

-1 × -1 × -1 × -1 × (-10x) = -5

Remember that a negative times a negative is always a positive.

So, since there are four negatives, then you just multiply it all together.

This results in 1 × (-10x) = -5

Simplify.

-10x = -5

Now, you simply divide both sides by -10.

-10x ÷ -10 = -5 ÷ -10

Simplify.

x = 1/2

~Hope I helped!~


6 0
4 years ago
At an assembly 7 out of the first 10 students who entered the gym we're carrying a backpack. Based on this on formation if 700 s
Romashka [77]

Answer:

490 students have back packs

Step-by-step explanation:

700 / 10 = 70

70* 7 = 490

6 0
4 years ago
Read 2 more answers
Considering the graph of a line with a negative slope, which of the following could be true? Check all that apply
Mandarinka [93]

Answer:

Step-by-step explanation:

The following statements are true:

B. As the absolute value of the negative slope gets smaller, the

graph of the line gets less steep.

E. The line goes down from left to right.

4 0
3 years ago
Read 2 more answers
Guys pls ı need help really....
cestrela7 [59]

Answer:

Step-by-step explanation:

Calculus....finally something FUN to answer!

This is integration, but here you have the area under the curve, you just don't have the upper bound. Setting that problem up looks like this:

28=\int\limits^b_1 {7x} \, dx  and using the First Fundamental Theorem of Calculus, that will integrate to look like this:

28=\frac{7x^2}{2} from 1 to b and applying the FTC:

28=\frac{7b^2}{2}-\frac{7}{2}  Multiplying everything by 2 to get rid of the denominators gives you:

56=7b^2-7\\\\56=7(b^2-1)\\8=b^2-1\\9=b^2\\b=3

5 0
2 years ago
Other questions:
  • M &lt;1= <br><br> A. 40<br> B. 80<br> C. 160
    6·1 answer
  • If you have a curvilinear relationship, then: (Hint: The two most important sources of bias in this context are probably lineari
    10·1 answer
  • Evaluate the triple integral. 5x dv, where e is bounded by the paraboloid x = 7y2 + 7z2 and the plane x = 7. e
    15·1 answer
  • If 6!+7!+8!=(n)(6!), then the value of n is<br> A) 15<br> B)16<br> C)63<br> D)64<br> E)15!
    5·1 answer
  • First grade children have heights that are normally distributed about a mean of 37 inches and a standard deviation of 2 inches.
    9·1 answer
  • Can you help me get the answer for <br> 1/3+1/4<br> plz
    5·2 answers
  • Me ajuda ai ....10x-1=2x^2+7
    13·1 answer
  • Find two numbers the quotient is between 53÷3
    5·1 answer
  • I will give brainiest to whoever answers correctly !!
    12·1 answer
  • Find the slope of the line.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!