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
Cloud computing will offer applications that are _______.
Komok [63]
B. only accesible over the internet
8 0
3 years ago
Read 2 more answers
State three positive uses of the computer in the government sector​
WINSTONCH [101]

Well Here I got 4

1. Email Functions

2. Distributing Payments

3. Record Keeping

4. Direct Mail Promotions

<em>Have A great night!</em>

<em></em>

6 0
3 years ago
Create a simple program of your own using a Loop that counts and displays numbers 1-10.
avanturin [10]

Answer:

I think

Explanation:

you....

8 0
3 years ago
The Apple ll is an IBM compatible PC “clone.”<br><br> True <br><br> False
aliya0001 [1]

Answer is: False


<u>Explanation:</u>

IBM PC compatible computers are computers similar to the original IBM PC, XT, and AT, able to use the same software and expansion cards. Such computers used to be referred to as PC clones, or IBM clones.

<u>PC clone:</u>

In computer programming, particularly object-oriented programming, cloning refers to object copying by a method or copy factory function, often called clone or copy , as opposed to by a copy constructor.

7 0
3 years ago
Place the steps in correct order for activating the resend option in Outlook. Choose Resend This Message Click Actions Open the
Dominik [7]

Answer:

1. Open the sent messages 2. Make additions/edits 3. Click actions                    4. Choose resend this Message  

Explanation:

I got It wrong on Edge, so it showed me the right answer

8 0
3 years ago
Other questions:
  • Write the interface (.h file) of a class ContestResult containing: An data member winner of type string, initialized to the empt
    14·1 answer
  • What is a constructor? Why would you include a constructor in a class?
    6·1 answer
  • What is the formula equivalent to the function =SUM(B1:B5)? A. =B1+B5 B. =$B$1+$B$5 C. =B1+B2+B3+B4+B5 D. =$B$1+$B$2+$B$3+$B$4+$
    7·1 answer
  • To close the ____ view, click File on the Ribbon or click the preview of the document in the Info gallery to return to the docum
    9·1 answer
  • Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te
    13·1 answer
  • When you use information hiding by selecting which properties and methods of a class to make public, you are assured that your d
    14·1 answer
  • Why are free web based providers so popular?
    12·1 answer
  • Which file is usually the first file to be displayed when you navigate to a website?
    5·1 answer
  • Debugging 2.17.3: Debug: The Two Towers Code Hs
    15·1 answer
  • Consider the following code using the posix pthreads api:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!