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
Neporo4naja [7]
3 years ago
14

If you need to write a do-while loop that will ask the user to enter a number between 2 and 5 inclusive, and will keep asking un

til the user enters a correct number, what is the loop condition? (2 > number || number > 5) (2<5 number && number > 5) (2 <= number && number <= 5)
Mathematics
1 answer:
Iteru [2.4K]3 years ago
3 0

Answer: (2 > number || number > 5)

Step-by-step explanation:

The do-while loop need to work until the user enters a correct number. In this case the number need to be between 2 and 5 inclusive.

On the opposite, if the user enters a number between 2 and 5 inclusive, he will leave the do-while loop.

Here is how it works : Once the user enters a number, the do-while loop will check this number.

If the number is NOT between 2 and 5 inclusive, the do-while loop will ask again the user to enter a number.

If the number is between 2 and 5 inclusive, the loop stop working.

So the do-while loop need to check if the number IS NOT between 2 and 5 inclusive.

If it is not between 2 and 5 inclusive, it could be :

Smaller than 2 : number < 2

Or greater than 5 = number > 5

The "or" condition is written by the symbols "||".

The loop condition is (2 > number || number > 5).

You might be interested in
Solve the following system of equations <br> x=-y-9<br> 5x-6y=-1
juin [17]

Answer:

x=y-9....1

5x-6y=-1.....2

putting the value of x in eqn 2

5y-45-6y=-1

-y=44

y=44

5 0
3 years ago
60 degrees in radius
jekas [21]
To convert to radians, multiply the number of degrees by π/180°.
60 * \frac{ \pi }{180}  \\  \frac{60 \pi }{180}  \\  \frac{ \pi }{3}

60° in radians is π/3.

Hope this helps!
4 0
3 years ago
Jill arranged her baseball cards in 4 rows of 9 cards then she arranged the cards in 2 rows of 18 cars how many other ways can J
Ronch [10]
She can arrange them in the following;
1 row of 36
2 rows of 18 (doesnt count because it says other and this has already been mentioned)
3 rows of 12
4 rows of 9 (doesnt count because it says other and this has already been mentioned)
6 rows of 6
3 0
3 years ago
Read 2 more answers
What is the area of rectangle PQRS with vertices at P(0,2), Q(0, 10), R(4,10) S(4,2)
Alex Ar [27]

Answer:

Step-bAsk your Teachery-step explanation:

5 0
3 years ago
Read 2 more answers
Which ratio is equivalent to 12 over 14
Alecsey [184]
12/14=6/7

Because you divide by 2. 
5 0
4 years ago
Read 2 more answers
Other questions:
  • Select the correct text in the passage. What is the opportunity cost in this scenario? Mikael has saved $4,000 for his trip to B
    5·1 answer
  • The area of a circle is 1 pie square feet. what is the radius?​
    8·1 answer
  • Can you help me plz <br> and thank you
    8·1 answer
  • Will give brainiest!
    9·1 answer
  • What is the inequality shown?
    13·1 answer
  • Please help with this!!!<br> In need of a answer fast!
    9·2 answers
  • Which equation represents a line that passes through the two points in the table?
    8·2 answers
  • Helppp i don’t know how to solve will make right answer brianlyist
    10·1 answer
  • Write the word sentence as an equation. Then solve the equation.
    12·1 answer
  • 32. Complete the proof
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!