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
How do you repair a USB?
kaheart [24]

Answer:

You can also try to fix corrupted USB drives with First Aid.

Go to Applications > Disk Utility.

Select the USB drive from the sidebar of Disk Utility.

Click First Aid on the top of the window.

Click Run on the pop-up window.

Wait until the scanning process finished.

Explanation:

8 0
3 years ago
Read 2 more answers
Synthesizing information can be done by creating
Maurinko [17]

Answer:

D

Explanation:

because you use all of those

4 0
3 years ago
Read 2 more answers
James gets a job at a multinational corporation. On his first day at work, he finds out that the numerical code assigned by the
s2008m [1.1K]

Answer:

IP address

Explanation:

In computer networks, every computer has assigned with a unique address that is called logical address or IP address.

This address is assigned by ICANN and used to access that particular computer by other computers on the network.

3 0
3 years ago
Tuesday
4vir4ik [10]

Answer:

?

Explanation:

these are instructions to a question?

7 0
2 years ago
The feedforward part of the conversation should do all of the following except __________.a.identify the toneb.introduce the pur
polet [3.4K]

Answer:

give leave taking clues

Explanation:

The feed forward part of the conversation should do all of the following except <u>give leave taking clues</u> a identify the tone introduce the purpose give leave-taking clues establish a time-frame

3 0
3 years ago
Other questions:
  • When employees are hired, they agree to only use cell phones during breaks. How would you classify this?
    8·2 answers
  • Trevor got home from work and suddenly realized that he needed to edit a certain file stored in the company network's server. ho
    11·1 answer
  • If you want to import text into a DTP application that was first created in a word processing program, what must you do?
    9·2 answers
  • Write syntactically correct Javascript code to sort an array of sub-arrays containing integers using the sort and reduce array f
    11·1 answer
  • Modify the sentence-generator program of Case Study so that it inputs its vocabulary from a set of text files at startup. The fi
    15·1 answer
  • How many dog breed are there
    9·2 answers
  • I made a mistake. I'm building my first PC and I bought a Ryzen 7 3800x and planning on getting a 2070 super (if I can). What I
    9·1 answer
  • Question # 5
    6·1 answer
  • Write a statement that slices a substring out of the string quote and puts it into a variable named selection. If given the stri
    8·1 answer
  • What are 3 customizations that can be done using the header/footer section in the customize reports tray?.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!