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
2.5 code practice I need answers please
Leni [432]

Answer:

import random

a = random.randint(1,10)

b = random.randint(1,10)

answer = a * b

print (str(a) + " X " + str(b) + " = " + str(answer))

Explanation:

Happy to help you mate

7 0
3 years ago
on which two interfaces or ports can security be improved by configuring executive timeouts? (choose two.)
ELEN [110]

Executive timeouts are configured using ports such as Console port, Aux port, VTY port.

Executive time outs are used to automatically disconnect devices which have been idle for a specific period of time.

In IOS devices, the executive timeout automatically disconnect users after 10 minutes of inactivity. These users can either be console or VTY user. The executive timeout can be set using line mode command.

Executive timeouts are configured using ports such as Console port, Aux port, VTY port.

Find out more using: brainly.com/question/13025617

5 0
2 years ago
What is the benefit of using the AND logical function instead of the IF function?
masya89 [10]

Answer:

Determines True if both conditions are met

Explanation:

If both inputs are true then the output is true, if one is false then it becomes false, if both are false it is also false

3 0
2 years ago
What is Relational Computerized Database
Anestetic [448]

Answer:

is a software used to maintain relational databases in a relational database software system

8 0
3 years ago
Read 2 more answers
You should structure the blank first before you search for a relevant picture
serious [3.7K]

Answer: true

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • Gian wants to add audio to his presentation whichaude ves not supported
    12·1 answer
  • True / False<br> Registers are generally optimized for capacity instead of speed.
    14·1 answer
  • In a transaction-processing system (TPS), if the TPS database can be queried and updated while the transaction is taking place,
    12·1 answer
  • What organization is responsible for the registration of Internet domain names?
    14·1 answer
  • The best way to achieve stronger encryption is to
    13·1 answer
  • Randy earn $22 per hour. This is an example of
    11·1 answer
  • What’s the purpose of balancing or monitoring your checking account?
    12·2 answers
  • . In testing, what is the role of an oracle?
    15·1 answer
  • Explain the different type of shift register counter ​
    14·1 answer
  • Alayna is researching information online to write her essay about the Berlin Wall.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!