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
Direction: using the data at the left, answer the questions that follows.​
Harlamova29_29 [7]
Oxygen has the faster speed bc it’s the highest
6 0
3 years ago
Look at the following form. Which input method is the form using to receive the user's favorite activity? What is your favorite
frutty [35]

Answer:

Select box

Explanation:

The HTML select box gives a lot of options where the user selects only on from many. it is defined as

<select>

<option>option 1</option>

<option>option 2</option>

<option>option 3</option>

</select>

Above is a select box having 3 options for the user to choose from. Apart from the select box HTML provides the radio button, which also gives the user the ability to select one from many.

8 0
3 years ago
Read 2 more answers
At what x position are the ellipses drawn??? thanks ♡​
Anna71 [15]

Answer:

55

Explanation:

The xPos variable is set to 55 and they have set the variable in the code for the ellipses in the x position

Hope this helps

7 0
3 years ago
Consider a relation representing the present position of molecules in a closed container. The attributes are the ID for the mole
pshichka [43]

Answer:

See attached picture.

Explanation:

8 0
3 years ago
Write a program that:
skad [1K]

Answer:

sucks to suck

Explanation:

4 0
3 years ago
Other questions:
  • A company decides to reduce its IT labor force by hiring an external company to manage various aspects of IT administration, suc
    6·1 answer
  • Provide examples of the cost of quality based on your own experiences
    14·1 answer
  • To rotate text in a cell select the option in the alignment grouping
    9·2 answers
  • Write a program that will generate a personalized invitation within a text file for each guest in the guest list file using the
    15·1 answer
  • Plz hurry it’s timed
    5·1 answer
  • A student can improve performance by decreasing
    14·1 answer
  • Write a Python program to find whether a given number (accept from the user) is positive
    11·1 answer
  • Why does brainly want me to PAY or watch ads<br> i hate doing that
    9·1 answer
  • ¿por que hay peligros en internet?
    11·1 answer
  • Which iteration must have an expression that has a true or false value?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!