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
explain in detail how such a company can improve the focus and relationship with customers, and what they will benefit from this
Reil [10]
Advertisement maybe
6 0
3 years ago
Which of the following questions will most likely be answered by displaying data on a line graph?
Artemon [7]
I'm pretty sure the answer is b
4 0
3 years ago
What is the importance of computer application to statistics​
Katarina [22]

Answer:

First off, I'm not writing your essay. I will give you a guide and you can take it from there. Also, I don't know any context about the question.

  • Computer applications can handle input and output at a significant rate.
  • Computers were designed to handle mathematical operations and now at today's rate a single 2+2 can spit out a answer in 64 nanoseconds.

4 0
3 years ago
A dns query failure is referred to a higher level domain name server under what condition
zalisa [80]
Within the Flags detail is a flag titled recursion desired. This flag shows whether or not the local DNS should continue to query other DNSs if it is not able to resolve the current query. As DNS is local, it may or may not have the enough information to allow the address to be resolved. If the recursion flag is set, the local <span>DNS will continue to query higher level DNSs until it is able to resolve the address.  In short, t</span>he condition is when a flag is raised and it doesn’t have enough <span>information to allow the request.</span>
5 0
2 years ago
Read 2 more answers
What type of message authentication code uses hashing to authenticate the sender by using both a hash function and a secret cryp
Vesna [10]
Answer is (HMAC) Hashed Message Authentication Code

This combines authentication via a shared secret cryptography algorithm key with hashing. It involves the client and server each with a private key. The client creates a unique hash per request to the server through hashing the request with private keys.






3 0
3 years ago
Other questions:
  • Declare a structure with a type name: Car containing:
    14·1 answer
  • True or False: You cannot change the default margin size for Word documents.  
    6·1 answer
  • The variety of theatre introduced in the 1960s that denotes semi-professional or even amateur theatre in the New York/Manhattan
    11·1 answer
  • Advantages of e commerce
    14·1 answer
  • Retraining is required at intervals of ___ or less.
    10·1 answer
  • Few companies today could realize their full-potential business value without updated ________. Select one: a. IT investments ma
    10·1 answer
  • You want to substitute one word with another throughout your document. What tool(s) should you use?
    9·1 answer
  • What will the declaration below do to its target?
    9·1 answer
  • Find different between manocots and dicots clarify with example​
    14·1 answer
  • Binary is best interpreted by a computer because ​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!