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
The ____ is the point in the past to which the recovered applications and data at the alternate infrastructure will be restored.
Genrish500 [490]

Answer:

Backup copy

Explanation:

system restore point is called a backup or backup copy of the system, this point keeps the inicial setting or configuration on the software, we usually use this tool when we're having some issues with the software, usually during the installation process  of a new software, letting us to save the data and off course with this point created the user could revert the issues or fix the problems occuring in the configuration.

5 0
3 years ago
How do I logout of Brainly on mobile? When I went to settings, it had the option to log out but it was grayed out.
poizon [28]
Just delete the app
8 0
3 years ago
Assignment
Lena [83]

Answer:

it

is

not

a

big

question

it

is

so

simple

5 0
3 years ago
When you ask the database more complex questions using comparison operators, you are conducting a _____. sort questionnaire quer
Mice21 [21]
The correct answer is known as a "query".

When you ask a lot of complex questions , which uses comparison operators, that is called a query. A query refers to the <span>exact request for </span>data retrieval<span> with the use of database and information systems. </span>
8 0
3 years ago
what is a tool or electrical system means intentionally creating a low-resistance path that connects to the earth
nikklg [1K]
A comper??><>?????????????????????????????????????
7 0
3 years ago
Other questions:
  • Some financial institutions can be really bad about putting unexpected charges
    12·1 answer
  • Which osi layer is responsible for combining bits into bytes and bytes into frames?
    8·1 answer
  • "The network layer is responsible for transferring packets of data from the A.Source computer to the destination computer on adj
    11·1 answer
  • ) How many switching functions of two variables (x and y) are there?
    11·1 answer
  • The loss of privacy data has implications:
    5·1 answer
  • What is a benefit of the Name Manager feature?​
    12·2 answers
  • What is the best stratiget to avoid paying intrest in your credit cared
    13·1 answer
  • When hacking a website to test a secure connection and ensure internet safety, what is a good way to check the coding of the web
    14·1 answer
  • A rectangle indicates a single process.true or false​
    7·2 answers
  • Amber, a network administrator, is conducting VoIP training for other IT team members. Melanie, a new team member, is confused a
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!