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
The interior angles formed by the sides of a quadrilateral have measures that sum to 360°.
hammer [34]

Answer:

<em>x = 59</em>

Step-by-step explanation:

<u>Equations</u>

The interior angles formed by the sides of a quadrilateral have measures that sum to 360°.

The image shows a four-sided polygon and its four angles measures, thus we sum them all and equate the sum to 360:

x + x + 2x + 3 + 2x + 3 = 360

Simplifying:

6x + 6 = 360

Subtracting 6:

6x = 354

Dividing by 6:

x = 354/6

x = 59

5 0
3 years ago
Read 2 more answers
(1) [6pts] Let R be the relation {(0, 1), (1, 1), (1, 2), (2, 0), (2, 2), (3, 0)} defined on the set {0, 1, 2, 3}. Find the foll
goldenfox [79]

Answer:

Following are the solution to the given points:

Step-by-step explanation:

In point 1:

The Reflexive closure:  

Relationship R reflexive closure becomes achieved with both the addition(a,a) to R Therefore, (a,a) is  (0,0),(1,1),(2,2) \ and \ (3,3)

Thus, the reflexive closure: R={(0,0),(0,1),(1,1),(1,2),(2,0),(2,2),(3,0), (3,3)}

In point 2:

The Symmetric closure:

R relation symmetrically closes by adding(b,a) to R for each (a,b) of R  Therefore, here (b,a) is:   (0,1),(0,2)\ and \ (0,3)

Thus, the Symmetrical closure:

R={(0,1),(0,2),(0,3)(1,0),(1,1)(1,2),(2,0),(2,2),(3,0), (3,3)}

8 0
3 years ago
Hello can you please help me posted picture of question
astra-53 [7]
The answer is D because there is one of the 0 and one of the 9
7 0
3 years ago
Read 2 more answers
Help! Can anyone help? I’ve been stuck.. I’ll make sure to give Brainly. The answer is not 3,850. Thank you.
erik [133]

9514 1404 393

Answer:

  $3400

Step-by-step explanation:

The way these tax tables are structured, you pay 3% on the first $10,000, 5% on the next $40,000, and 5.5% on the remaining $20,000 above $50,000.

tax = 0.03·10,000 +0.05·(50,000 -10,000) +0.055·(70,000 -50000)

  = 300 + 2000 +1100

  = 3400 . . . dollars

The tax owed on $70,000 is $3,400.

_____

<em>Additional comment</em>

I like to rewrite this sort of table to a different format:

  • 3% of income . . . . . . . . . . . . . . . applies for income ≤ 10,000
  • (5% of income) -$200 . . . . . . . . applies for 10,000 < income ≤ 50,000
  • (5.5% of income) -$450 . . . . . . .applies for 50,000 < income ≤ 100,000

For an income of $70,000, the tax computation using this form is one multiplication and one addition, rather than 3 multiplications and 4 additions as used when navigating the given table.

6 0
3 years ago
Carlton thinks that converting metric units is as easy as moving the ________​
fredd [130]

Answer:

  • Carlton thinks that converting metric units is as easy as moving the <u>decimal point</u>

Step-by-step explanation:

  • When you convert the unit, you move decimal point  on your answer from the left to the right or from the right to the left the number of places as per relevant prefix.

<u>Example: </u>

  • 1 meter = 1000 millimeters (1.0 m = 1000.0 mm)
  • 1 milligram = 0.001 grams ( 1.0 mg = 0.001 g)

<em>see attached for prefixes</em>

6 0
3 years ago
Read 2 more answers
Other questions:
  • Help fast and now plz
    7·1 answer
  • Brianne can paint 120 square feet of walls in 34 hour.
    13·1 answer
  • I need help with this question plzzz <br><br> Geometry
    15·1 answer
  • Four water tanks can hold a total of 432.4 gallons of water. On average, how much water can one tank hold? How much water is in
    11·2 answers
  • Need help with this please! best answer will get brainliest!!
    14·1 answer
  • What is a detailed example of simple interest?
    14·1 answer
  • 511 ÷ 7 pls show how you got it
    13·1 answer
  • Guys please help me i need pictures
    6·1 answer
  • Find the least common denominator for these fractions.
    14·1 answer
  • Need help pleaseI was bad at math in school so lwant to learn
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!