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
Llana [10]
3 years ago
6

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;

return 0;
}
Computers and Technology
2 answers:
OLEGan [10]3 years ago
8 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   int userInput = 0;

   do {

       cout << "Enter a number (<100):" << endl;

       cin >> userInput;

   }

   while(userInput >= 100);

   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.

Print out the number that is smaller than 100.

shtirl [24]3 years ago
3 0

Answer:

import java.util.Scanner;

public class NumberPrompt {

  public static void main (String [] args) {

     Scanner scnr = new Scanner(System.in);

     int userInput = 0;

     

     do {

         System.out.println("Enter a number (<100):");  

         userInput = scnr.nextInt();

     }

       while(userInput >= 100);

     System.out.println("Your number < 100 is: " +userInput);

     

     

        }

}

   

           

         

Explanation:

Answer in java

You might be interested in
What will you better be prepared for by learning about the animals you photograph
krek1111 [17]

D. All of the above.

Makes the most sense! :3

6 0
2 years ago
Which way do you swipe in ios to get to the control center
Korvikt [17]

Answer:

Swipe down in the right corner or for older versions swipe from bottom

Explanation:

6 0
2 years ago
What was ARPANET?
Anit [1.1K]

Answer:

The ARPANET was the first network that provided commercial internet services. And also it was the first network to make use of the TCP/IP protocols. However, you need to know that the first ISP or the internet service provider was the Telenet, and it was the first commercial version of the ARPANET which was introduced in the year 1974. And this service started its service for the customers in the year 1989.

Explanation:

Please check the answer section.

7 0
3 years ago
The system should enable the staff of each academic department to examine the courses offered by their department, add and remov
Ganezh [65]

Answer:

See attached picture.

Explanation:

See attached picture.

3 0
3 years ago
Bill, a project manager, wants to hire external resources. What step should Bill take before hiring external resources?
devlian [24]

Answer:

bhai sahab kya question hai mujhe samajh mein hi nahin per Sara sale Kya Re Tu Hi Sab Kuchh Nahin

8 0
2 years ago
Other questions:
  • The process of making raw materials into a finished product is known as
    14·2 answers
  • The sequence of folders to a file or folder is known as its _______.
    6·1 answer
  • Which three phrases describe a wireframe
    12·1 answer
  • Your boss wants to utilize some sort of cloud storage for his files so that all of his
    10·2 answers
  • A law office has been leasing dark fiber from a local telecommunications company to connect a remote office to company headquart
    14·1 answer
  • The M:N relationship between STUDENT and CLASS must be divided into two 1:M relationships through the use of the ENROLL entity;
    10·2 answers
  • A company that provides finance services wants to shift to a mobile platform. What is the major advantage that the users of the
    10·2 answers
  • C:\windows\system32\drivers\etc\protocol is an example of a file ________. select one:
    5·1 answer
  • Suppression of politically or socially unacceptable co
    5·1 answer
  • Koi jinda hei kya hello​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!