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]
2 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]2 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]2 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
How many levels of full body protective clothing are there? A. Four B. Seven C. Six D. Two
Verdich [7]
The answer is A. Four
4 0
3 years ago
Read 2 more answers
Kelly is a college sophomore majoring in computer science. She is interested in gaining exposure to the most useful and current
Nuetrik [128]

Answer:

Java

Explanation:

Java is a general-purpose programming language that is object-oriented, and has strong support for web development.

Therefore, one of the languages that a college sophomore majoring computer science learn is <u>Java,</u> an object-oriented programming language that is commonly used to write Web applications.

6 0
3 years ago
The Earth's _______ is ductile overall, tending to flow very slowly and deform in a _______ manner.
kipiarov [429]

<span>The asthenosphere is a part of the upper mantle just below the </span>lithosphere<span> <span>that is involved in </span></span>plate tectonic movement<span> <span>and </span></span>isostatic<span> <span>adjustments. The lithosphere-asthenosphere boundary is conventionally taken at the 1300 °C </span></span>isotherm<span>, above which the mantle behaves in a rigid fashion and below which it behaves in a </span>ductile<span> fashion. a</span><span>nd </span>flows very slowly, in a manner<span> similar to the ice at a bottom of a glacier.</span>

5 0
3 years ago
Read 2 more answers
QUESTION 1
slava [35]
Answer is Bit defender Internet security
B
6 0
2 years ago
Carol typed a memo to send to everyone in her department. To create this memo, she used a _____.
aleksley [76]

she used a word processor

8 0
3 years ago
Read 2 more answers
Other questions:
  • The _____ icon looks like a clipboard with a page of paper attached. Cut Copy Paste Clipboard
    5·1 answer
  • Functions that are built-in into PHP to perform some standard operations.
    15·1 answer
  • A barcode is a Select one: a. coded instruction needed to control computer hardware. b. confidential computer code required by H
    7·1 answer
  • Consider the classes below: public class TestA { public static void main(String[] args) { ​ int x = 2; ​ int y = 20 ​ int counte
    6·1 answer
  • Need answer ASAP.
    8·1 answer
  • If im downloading a game at 4mb/s how many minutes would it take to download 25 GB
    14·2 answers
  • Sometimes we care about the order of a list, and need to reorder the items according to a condition (alphabetical, numerical, et
    11·2 answers
  • Program Convert Measurements:
    15·1 answer
  • The _____ of a story describes the time and location of a story.
    5·2 answers
  • What is the minimum number of bits you would need to represent a number on a 0 to 10 scale
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!