jesusfernadez0160
jesusfernadez0160 jesusfernadez0160
  • 19-03-2020
  • Computers and Technology
contestada

How to write a “do while” loop that inputs a num which must be between 10-20. (Pic has all instructions)

How to write a do while loop that inputs a num which must be between 1020 Pic has all instructions class=

Respuesta :

problemsolver2019
problemsolver2019 problemsolver2019
  • 26-03-2020

Answer:

# include <iostream>

using namespace::std;

int main()  

{  

   int num;

   do

   {

       

       cout<<"Enter number:";

       cin>> num;

   } while(num<=20 && num >=10);

   cout<<"You entered out of range";

   return 0;

}

Explanation:

Please find the required program in the answer section. And you should know that a do-while loop is used when we want to make sure that the loop runs for at least one time.

Answer Link

Otras preguntas

the I-ready quiz!…. Brainly
Identify the basic shapes in the figure
What’s the answer to 3/4x = 2
explain two different ways in which the United States contributed to the success of the Allies in the European Theater during World War II.
If a server does not get the ball over the net they can continue to try until they get it over Question 3 options: True False.
Which object has the most thermal energy?
If the radius of a pizza has a length of X + 5 units, what is the area of the pizza? What is the value when x = 10 inches?
HELPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP MEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE PWESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
can you please help? i need to do this test. ​
Your bill comes to $23.55 at a restaurant. How much money should you leave for a 20% tip?