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
Explain pls and thanks
murzikaleks [220]

Starting more simply, if we wanted to know how many students like pink in general, that's 68/100. We could do that for each single category and the fractions would add together to equal 1. Now say we wanted to know something about that 68/100 people. That 68 is our new 100%, or another way of looking at it is if we take however many people like pink and don't like black and those that do like black, they will equal 68/68.

The number of people that like pink but don't like black is 41/68 and those that like pink and black are 27/68. 27+41=68 For the question of your problem it is asking about those that do not like pink which you can tell from the table or use from my saying 68/100 like pink is 32. Now you can split that into those that do or don't like black, and the two results will equal 32/32.

7 0
3 years ago
PLEASE HELP ILL GIVE THANKS, 5.0, AND BRAINLIEST TO WHOEVER ANSWERS CORRECTLY PLEASE HELP AND ILL GIVE A HIGH POINT COUNT
Allushta [10]

Answer:

<h3>FOR THIS PROBLEM I GOT..... (20/r)-(20/s)</h3>

Step-by-step explanation:

pls brainlest mee

6 0
2 years ago
2.<br> ers What is 592 rounded to<br> the nearest 10?
Lady bird [3.3K]
590. Since 2 is under 5 you round it down
7 0
2 years ago
Identify the monomial function(s) that have a maximum.
natima [27]

Answer:

Step-by-step explanation:

For a function f to have a maximum as per derivative rule we have to have

f'(x) =0, f"(x) <0

If second derivative =0 also then it is not maximum but point of inflections

Whenever f(x) = ax^n

we have

f'(x) = 0 gives x=0 and

f"(x) = n(n-1) ax ^(n-2)

So for n greater than or equal to there cannot be any maximum

And also for a straight line

y =-4x

y'=-4 and y"-0

No maximum

So only maximum can be for a funciton of the form y = ax^2

Here we do not have that all degrees are either 1 or greater than 1.

So no maximum for any funciton.

4 0
3 years ago
Read 2 more answers
According to a study done by a university​ student, the probability a randomly selected individual will not cover his or her mou
solniwko [45]

Complete Question

According to a study done by a university student, the probability a randomly selected individual will not cover his or her mouth when sneezing is 0.267 Suppose you sit on a bench in a mall and observe people's habits as they sneeze

(a) What is the probability that among 18 randomly observed individuals exactly 6 do not cover their mouth when sneezing?

Answer:

P(X=6)=(0.162)

Step-by-step explanation:

From the question we are told that:

Sample size n=18

Probability P=0.267

No. that do not cover their mouth when sneezing x=6

Generally the equation for The Binomial distribution is mathematically given by

Parameters

B(18,0.267)

Therefore

P(X=x)=(18..x)(0.267)^x(1-0.267)^{18-x}

Where

x=6

Therefore

P(X=6)=(18..6)(0.267)^6(1-0.267)^{18-6}

P(X=6)=(0.162)

5 0
3 years ago
Other questions:
  • Round 5.492 to the place value of the underlined digit.
    7·1 answer
  • How many solutions does this linear system have? y =2/3 x+ 2 6x – 4y = –10
    13·1 answer
  • When x=12,y=8. Find x when y=12
    6·1 answer
  • Please help me I took a picture so I can have a correct answer......!!!!!!! Please help me
    8·1 answer
  • Multiply for the following polynomial (y-8) (y+5) with the work included.
    6·1 answer
  • Roses produced asexually from cuttings are genetically identical to the parent. Roses grown from sexually produced seeds may loo
    11·2 answers
  • Someone help me ...plzz
    14·1 answer
  • Find the surface area of a square pyramid with side length 4 and slant height 5.
    14·1 answer
  • Solve for the variable.*<br> -a + 3a =10<br> A. {-9}<br> B. {5}<br> C. {-11}<br> D. {2}
    15·2 answers
  • How do i graph x+3y=−12?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!