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
Tell whether the table shows a linear or nonlinear function. If it is a linear, is it increasing or decreasing?
Elis [28]
I think it’s nonlinear and increasing
8 0
3 years ago
¿cuanto es 8 decenas?<br>Ayuda Porfavor ​
Anna11 [10]

Reapuesta: 8d = 80u

Tenemos que una decena equivale a 10 unidades.

Debemos multiplicar las 8 decenas por el valor de una sola decena.

\:  \:  \:   \Rightarrow\bf{8(10) = 80 \: unidades}

8 decenas equivalen a 80 unidades.

Espero que te sirva, salu2!!!!

3 0
2 years ago
Read 2 more answers
Which point best represent 10
kozerog [31]

Answer:

r

Step-by-step explanation:

8 0
3 years ago
Read 2 more answers
If 1/2 of 1 is 1/2 , what is 1/2 of ,2 , 3 and 4
Tpy6a [65]

Answer:

Half of 2 is 1. Half of 3 is 1.5 and half of 4 is 2

4 0
4 years ago
If the radius of circle A is 6 units, calculate the area of the shaded region...
meriva

The formula of an area of a triangle:

A_{\triangle}=\dfrac{base\cdot height}{2}

We have:

\triangle_{FDE}:\ base=height=1\\\triangle_{GDH}:\ base=height=9

substitute:

A_{\triangle_{FDE}}=\dfrac{1\cdot1}{2}=0.5\\\\A_{\triangle_{GDH}}=\dfrac{9\cdot9}{2}=40.5

The formula of an area of a circle:

A_O=\pi r^2

We have r=6

Substitute:

A_O=\pi\cdot6^2=36\pi\approx36\cdot3.14=113.04

The area of the shaded region

A=A_O-(A_{\triangle_{FDE}}+A_{\triangle_{GDH}})\\\\A=113.04-(0.5+40.5)=113.04-41=72.04\ u^2

4 0
4 years ago
Other questions:
  • The sum of two integers with different signs is 8
    11·1 answer
  • A sporting goods store is having a 15% off sale on all items. Which functions can be used to find the sale price of an item that
    5·1 answer
  • Let f(x) = 2x - 6 Solve f-1(x) when x = 2..
    14·1 answer
  • A consumer group was interested in comparing the operating time of cordless toothbrushes manufactured by two different companies
    7·1 answer
  • Full working out for this question please.
    6·2 answers
  • How many eighth notes do you need to total the amount of a half note
    11·1 answer
  • Did anyone know that 11+11 is the same thing as 10+10<br> because 11+11=22
    13·1 answer
  • Which of the following numbers is irrational
    12·1 answer
  • A rectangle with sides 4 in. and 7 in. was enlarged in the ratio 1:2
    10·1 answer
  • Mr. Mole left his burrow that lies below the ground and started digging his way at a constant rate deeper into
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!