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

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 newline Ex: For the user input 123, 395, 25, the expected output is:

Computers and Technology
2 answers:
nataly862011 [7]3 years ago
4 0

Complete Question:

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

Answer:

import java.util.Scanner;

public class num8 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int n;

       do{

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

           n= in.nextInt();

       }while(n>100);

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

   }

}

Explanation:

Using Java programming language

Import the scanner class to receive user input

create an int variable (n) to hold the entered value

create a do while loop that continuously prompts the user to enter a number less than 100

the condition is while(n>100) It should continue the loop (prompting the user) until a number less than 100 is entered.

lara [203]3 years ago
4 0

Answer:

do{

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

           userInput = scnr.nextInt();

        } while(userInput > 100);

Explanation:

You might be interested in
Which of the following is not a job title associated with a career in visual and audio technology? master control operator produ
mario62 [17]

Answer:

Optometrist

Explanation:

Optometrists are healthcare professionals who provide primary vision care ranging from sight testing and correction to the diagnosis, treatment, and management of vision changes. An optometrist is not a medical doctor.

5 0
4 years ago
How do keygens work?
Artist 52 [7]
What are keygens please

3 0
4 years ago
Suppose you joined a company that had a WAN composed of SONET, T carrier, and frame relay services, each selected to match a spe
wariber [46]

Answer:

Colts, gan 8 This depends on depends on How suitable the varbus technolog. A axe fol the Applicationd Supporlds Today, increasingly Network...

6 0
3 years ago
Frames control what displays on the Stage, while keyframes help to set up
pogonyaev

Answer: A keyframe is a location on a timeline which marks the beginning or end of a transition. So for example, you have a movie and it transitions to another scene, keyframes tell it when and where to start the transition then when and where to stop the transition.

3 0
3 years ago
Why is it important to create a free body diagram
Lynna [10]

Answer:

because you need something to go back on to look at

Explanation: to use notes to there fullest and it will help you in the long run and if you add that to your notes they will be easyer to  look back on and be filled in  

5 0
3 years ago
Read 2 more answers
Other questions:
  • Why isn't there a Psychology section on this app?
    5·1 answer
  • How do you plan to keep your personal and professional connections and activity seperate on various social media platforms?
    15·1 answer
  • 7. Glaciers have two types of deposition. Define them below:
    6·1 answer
  • Money from a Coverdell Education Savings Account can be used for:
    11·1 answer
  • How does sugar dissolve in water ? &amp; Read Carefully ?
    9·1 answer
  • A series of projects that are organized in such a way that each project utilizes people from different functional areas is using
    12·1 answer
  • Pls help!!!!!!!!!!!!
    13·2 answers
  • Functions can accept any number of arguments.
    8·1 answer
  • Who wanna do a rp pick ur own character but dont answer if you dont know what were doing i will put brainliest if someone gives
    11·1 answer
  • John is directing a television series. He has to shoot a scene that presents the lead character in a dominating and commanding p
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!