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]
3 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]3 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
Why did artists use pinhole cameras during the renaissance?
Dima020 [189]
Pinhole cameras were one of the most sophisticated devices of the period, it made tasks much easier it basically worked exactly like the human eye and is something just like tracing.
8 0
3 years ago
When a program uses a ____, it reads all the records in the file from beginning to end, processing them one at a time. Group of
DIA [1.3K]

Answer:

nooo noob 2+2=5

Explanation:

why noob bullly bully

4 0
3 years ago
Question 19
MaRussiya [10]

Answer

D

Explanation:

5 0
3 years ago
Read 2 more answers
In what ways are computers being used to improve our quality of life
Helga [31]

Answer:

  • computers help with our education system
  • communicating with others is easier (emails/text messages opposed to sending an envelope)
  • technological advances

5 0
3 years ago
Read 2 more answers
Please help me on this app how do you take a picture of your work
IrinaVladis [17]
You take a picture on your regular camera. Then you go you go to the thingamajigger that looks like a paper clip. You tap it and choose the photo.
6 0
3 years ago
Other questions:
  • Google plus has communities BUT
    5·2 answers
  • What type of mitigation provision is utilized when redundant communications links are installed?
    8·1 answer
  • What is the name of the malware included in CCleaner?
    11·1 answer
  • A DBMS makes the: a. relational database available for different analytical views. b. physical database available for different
    12·1 answer
  • Why did Herman Hollerith invent the Tabulating Machine?
    10·1 answer
  • String member function compare compares two strings (or substrings) and returns 0 if:
    5·1 answer
  • Consider the following concurrent tasks, in which each assignment statement executes atomically. Within a task, the statements o
    9·1 answer
  • Who Keeps Reporting My questions<br><br> Please Be Honest Lying Isnt Nice
    15·1 answer
  • SmartArt is a Microsoft Office tool for creating what?
    11·2 answers
  • Which of the following numbers is of type
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!