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
Sara receives a 9% commission on every car she sells. The car dealership paid $20,000 for a car from an auction. The next day th
Paladinen [302]

Hey there! Your answer to this problem is 2160..

Explanantion:

Since every car Sara sells, she gets 9% of the commission, this means that at the last few step, we would have to give 9% of the total cost to Sara.

If 100% is 20,000, then 50% would be 10,000. But we have to find the cost of 20%. So what we would actually be doing is multiplying 20 with 0.01. 20x0.01 is 0.2 or 0.20.

Then you add the 4,000 to the 20,000 because it states, “the next day, they sold the car 20% more than they paid. This means that you’ll have to add it. 20,000 plus 4000 would be 24,000. So 24,000 would be the cost of the car they sold.

However they didn’t wanna know the cost of the car, they wanted to know how much Sara would get. So you would have to take 9% of the cost of the cost which would be 2,160.

Final result: $2,160

4 0
3 years ago
Y=4x. Y=40. What does x equal
egoroff_w [7]

Answer:

Your answer is 10!

Y = 4x

(40) = 4x

40 = 4(10)

4 0
2 years ago
Read 2 more answers
How is Pascal's triangle used in binomial theorem?.
Scorpion4ik [409]

To simplify the process of expanding a binomial of the type (a+b) n (a + b) n, use Pascal's triangle. The same numbered row in Pascal's triangle will match the power of n that the binomial is being raised to.

A triangular array of binomial coefficients known as Pascal's triangle can be found in algebra, combinatorics, and probability theory. Even though other mathematicians studied it centuries before him in India, Persia, China, Germany, and Italy, it is called after the French mathematician Blaise Pascal in a large portion of the Western world. Traditionally, the rows of Pascal's triangle are listed from row =0 at the top (the 0th row). Each row's entries are numbered starting at k=0 on the left and are often staggered in relation to the numbers in the next rows. The triangle could be created in the manner shown below: The top row of the table, row 0, contains one unique nonzero entry.

Learn more about triangle here

brainly.com/question/2773823

#SPJ4

7 0
1 year ago
Any help on this pleasee anyone??
meriva
False, it would not make a right triangle
8 0
3 years ago
Please help!!<br><br> show work(factoring) <br><br> u^4 - 3u^2 - 4
Schach [20]
Answer: (u^2+1) * (u-2) * (u+2)
5 0
3 years ago
Other questions:
  • 3x-6/x-2<br><br> Show your answer!!
    13·1 answer
  • Simplify each of the following powers of i. I^32
    11·2 answers
  • How do u solve this?
    7·1 answer
  • Please &amp; Thank you!!
    11·1 answer
  • To approach the runway, a pilot of a small plane must begin a 10 degrees descent starting from a height of 1983 feet above the g
    7·1 answer
  • How many solutions are there to the equation n^2-13n=-40
    14·2 answers
  • What is the axis of symmetry of -2x^2+12x-3
    11·1 answer
  • Karita had $138.72 in her checking account . She wrote checks for $45.23 and $18.00. Then she made a deposit of 75.85 into her a
    12·1 answer
  • What is the median? This is from an Iready
    11·2 answers
  • Can someone help me on this ASAP? This is a PRACTICE test and i already know the answer which is A.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!