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

Why was the road to democracy harder for France than for England?
4* what will give you one hundred
The initial speed of a body is 2.98 m/s.What is its speed after 1.6 s if it accelerates uniformly at 2.51 m/s^2?Answer in units of m/sWhat is its speed after 1.
Select the approximate values of x that are solutions to f(x) = 0, wheref(x) = -9x^2 + 7x + 2
what happens when particles vibrate?
Is a bugle energy or matter
A map of Nelson County is laid out in the standard (x,y) coordinate plane below, where the center of the county is at (0,0). a cell phone tower is at (5,4) and
What was the primary reason the Pilgrims came to the New World?
2. What unit of measure would you use for the volume of water in a bathtub? 3. What unit of measure would you use for the volume of medicine in a capsule? Help
-7x+6y=10Please help