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: 25
c++
#include
using namespace std;
int main() {
int userInput = 0;
do
cout << "Your number < 100 is: " << userInput << endl;
cout << "Your number < 100 is: " << userInput << endl;
return 0;
}
Explanation:
Inside the <em>do part</em>, ask user to enter a number and get that number.
In the <em>while</em>, check if the number is greater than or equal to 100. It is going to keep asking to enter a number until a number that is smaller than 100 is entered.
The answer to this question is the term bus. The term bus in computers is a communication system that transfers data and information in the computer to another computer. The bus are parallel wires that can be either optical or fiber that are connected in multiple switched hubs.