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
$32 is 8% of what amount?
e-lub [12.9K]

Answer:

$32 is 8% of 400

Step-by-step explanation:

Have a good day :)

4 0
3 years ago
Read 2 more answers
Thomas hiked 6 miles in Monday, 10 Thomamiles on Tuesday and 8 miles on Wednesday. Which value is closest to the mean number of
Korolek [52]
I think the answer is 7
7 0
4 years ago
How do you solve a+4 when a=7
nordsb [41]

Answer:

If a is equal to 7 it would be 11. 7+4

Step-by-step explanation:

8 0
3 years ago
You have a garden in your backyard that measures 15 meters by 20 meters. You want to place stepping stones around the perimeter
Anettt [7]

Answer:

0.5 m

Step-by-step explanation:

Given that the dimensions of the garden are 15 meters by 20 meters.

The area of the new garden (original garden + stone placed around the perimeter) is 336m².

Let d be the width of the border having stepping stones as shown in the figure. The shaded region in the figure is the area having stepping stones.

The area including the shaded region = (15+2d)(20+2d) m^2

\Rightarrow 336  = (15+2d)(20+2d) \\\\\Rightarrow 336  = 300+ 70 d +4d^2 \\\\\Rightarrow 4d^2 +70d+300-336=0 \\\\\Rightarrow 4d^2 +70d-36=0 \\\\\Rightarrow 2d^2 +35d-18=0 \\\\\Rightarrow 2d^2 +36d-d-18=0 \\\\\Rightarrow (2d-1)(d+18)=0 \\\\\Rightarrow (2d-1)=0, \; or \; (d+18) \\\\\Rightarrow d= 0.5\;or -18 \\\\

As the width of the stone border can't be a negative value, so taking the positive value.

Hence, the width of the stone border is 0.5 m.

So, the wi

7 0
3 years ago
The scatterplot shows the ages and finishing times of seven men who ran a charity 5K run. Use the labeled points to create a lin
Alika [10]

Answer:

0.47x + 7.72

Step-by-step explanation:

We have to create a Linear model using the given two points on the graph. The two points are: (21, 17.5) and (43, 2.75)

The general equation of the line in slope intercept form is

y = mx + c

where m is the slope and c is the y-intercept.

Calculating the slope:

slope=m=\frac{\textrm{Difference of y coordinates}}{\textrm{Difference of x coordinates}} \\\\ slope=m=\frac{27.75-17.5}{43-21}\\\\m=0.47

Using the value of m in above equation we get:

y = 0.47x + c

Calculating the y-intercept:

Using any of the given points we can calculate the value of c. Using the point (21, 17.5) in the above equation, we get:

17.5 = 0.47(21) + c

c = 17.5 - 0.47(21)

c = 7.63

Therefore, the equation is:

y = 0.47x + 7.63

Hence option a is the correct answer. The slight change in the value of "c" is because of rounding the value of m to 2 decimal places.

So from the given options, the correct answers is:

y = 0.47x + 7.72

3 0
3 years ago
Read 2 more answers
Other questions:
  • Given that h(x) = |12x - 4| + 6, what is the value of x when h(x) = 4?
    15·1 answer
  • if y varies inversely as x and y = 194 when x = -13, find y when x = 50. Round your answer to the nearest hundredth, if necessar
    15·1 answer
  • 1 4/11 divided by 1/11
    13·1 answer
  • You pick a card at random.
    6·1 answer
  • If each foot of water in a lake screens out 60% of the light above, what percent of the light passes through 5 feet of water?
    12·1 answer
  • A parallelogram has a base of 14 centimeters and a height of 20 centimeters.What is the area of the parralegram
    13·1 answer
  • Estimate each quotient to the nearest whole number. Then, find the actual quotient. EASY PLS HELP
    6·1 answer
  • Chase is building a birdhouse in the shape of a regular polygon. He knows that the measure of the interior angle is twice the me
    13·1 answer
  • the cost to rent skis at a local sporting goods store is $15 plus $20 per day. which equation models the relationship between th
    11·1 answer
  • MARKING BRAINLIEST HELP
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!