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
Oksi-84 [34.3K]
2 years ago
15

Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less

than 100. End each prompt with a newline. Ex: For the user input 123, 395, 25, the expected output is:Enter a number (<100): Enter a number (<100): Enter a number (<100): Your number < 100 is: 25c++ #include using namespace std;int main() { int userInput = 0;do cout << "Your number < 100 is: " << userInput << endl; return 0;}
Computers and Technology
1 answer:
Ad libitum [116K]2 years ago
6 0

Answer:

#include<iostream>//library inclusion

using namespace std;

int main()

{

int userInput;

do//start of do while loop

{

 cout << "Enter a number less than a 100" << endl;

 cin >> userInput;

 if (userInput < 100) //condition

 {

  cout << "YOu entered less than a hundred: " << userInput << endl;

 }

 else

 {

  cout << "your number is greater than 100" << endl;

 }

} while (userInput > 100);//condition for do while

return 0;//termination of int main

}

Explanation:

The program has been commented for you. The do-while loop enters the first loop regardless of the condition. Then after the first iteration, it checks for the condition. If the condition is being met, it will iterate through, again. Otherwise it will break out of the loop and land on the "return 0;" line. Which also happens to be the termination of the program in this case. The if-else condition is used for the user to see when prompted.

You might be interested in
A state government is attempting to reduce the digital divide. Which of the following activities has the greatest potential to c
Sveta_85 [38]

Answer:

The correct answer is

Working with technology companies to offer computing devices at discounted prices to individuals with reduced incomes

Explanation:

As per the question, state government is trying to reduce the digital divide which primarily exists because low income people do not have access to the digital devices. Hence, any step taken to help the low income people to get the digital device will be the best strategy of government to reduce the digital divide.

Thus, the correct answer is Working with technology companies to offer computing devices at discounted prices to individuals with reduced incomes

7 0
3 years ago
A DTP firm has published and printed flyers for an upcoming fundraising event. In which section of the flyer would you find the
Annette [7]
Typically the contact details for the firm would be at the bottom of the flyer.

This is to allow room for the main event itself to be advertised in top and central area of the flyer real-estate.
7 0
2 years ago
Read 2 more answers
To move an icon, you right-click it and select “Pin to start menu.” True False
tester [92]

"To move an icon, you right-click it and select “Pin to start menu.” True False"

False

4 0
2 years ago
Read 2 more answers
What is an aptitude assessment that matches students with study programs at specific colleges and universities?
melisa1 [442]
I think the correct answer would be FOCUS2. It is a system that guides members in choosing college or a major. It provides a starting point for students who are not yet certain of what they want to take academically. Hope this helps.
5 0
3 years ago
Read 2 more answers
My cell phone rear camera is dirty does anyone know how to clean it?
Vesna [10]
If you have glasses the liquid and cloth can be used to clean it. You spray the camera, then use the cloth to wipe it up. If you don't have them the dollar store should have some, or even places like Walmart and Maceys.
5 0
2 years ago
Read 2 more answers
Other questions:
  • Write a program that estimates the approximate number of times the user’s heart has beat in his/her lifetime using an average he
    12·1 answer
  • Binary search requires that data to search be in order. true or false
    5·1 answer
  • The tax calculator program of the case study outputs a floating-point number that might show more than two digits of precision.
    7·1 answer
  • sandra has houseplants sitting on her kitchen windowsill, where it receives a lot of sunlight . what will most likely be the pla
    9·2 answers
  • 2 examples of miniature storage media ?
    8·2 answers
  • Karen is designing a website for her uncle's landscaping business. She wants to ensure that it's engaging and provides a lot of
    5·1 answer
  • What is media ethics. Explain two forms of maintaining media ethics with examples​
    13·1 answer
  • Cho dãy A gồm N số nguyên a1,...aN. Hãy đếm tất cả các số âm hoặc không chia hết cho 5 trong dãy
    12·1 answer
  • What are the three algorithm constructs?
    7·1 answer
  • MODERATOR DELETE MY ACC
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!