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 software is used to mimic intricate hand drawings into digital paintings? _____ is used to replicate hand drawings into di
bixtya [17]

Answer: Graphics tablet

hope this helps

6 0
3 years ago
Which of the following statements is false?
Sergio039 [100]

Answer:

Option (d)

Explanation:

Option (a) the return type of the method specifies the type of the data that is returned for the method calling. The return type can be void if it doesn't return any value. The method return can be int, string and bool etc. So, option (a) is true and it not the correct option.

Option (b) is true it doesn't need any parameters. So, option (b) is not the correct option.

Option (c) is true. If the method has some return type other than void it must return something according to the return type.So, option (c) is not the correct option.

Option (d) is false. Getters and setters methods are used for accessing private variables but the name MUST start with get or set is false. The best practice is to start with get and set but it is NOT a must.

So, option (d) is correct option.

6 0
3 years ago
What free website can you record videos on, and edit them without money?
Alex17521 [72]

Answer:

You can edit videos on Capcut for free and I think you can also use Alightmoon

7 0
2 years ago
Read 2 more answers
10.Find the first ICMP Echo Request message that was sent by your computer after you changed the Packet Size in pingplotter to b
Shalnov [3]

Answer:

The message was fragmented across more than one IP datagram

Explanation:

ICMP Echo Request query message is a request sent by a user to a destination system, which then sends an ICMP Echo Reply query message`as a reply.

After I changed the Packet Size in pingplotter to be 2000, the first ICMP Echo Request message that was sent by the computer was:

Flags: 0×01 more fragments.

The message was fragmented across more than one IP datagram

6 0
3 years ago
True or False: clicking ads and pop-ups like the one below could expose your computer to malware.
Ratling [72]

True, clicking ads and pop-ups can expose your computer to malware.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Write a recursive method public static String reverse(String str) that computes the reverse of a string. For example, reverse("f
    6·1 answer
  • The Freemont Automobile Factory has discovered that the longer a worker has been on the job, the more parts the worker can produ
    11·1 answer
  • Which wireless technology has a typical transfer rate of 1 Mbps to 3 Mbps at distances up to about 10 meters?
    7·1 answer
  • Your grandmother was an established artist and left you several original paintings after she died. Which of these statements is
    6·1 answer
  • The system restore utility can be started from command line using what executable?
    11·1 answer
  • To what would you compare the transport layer?
    14·1 answer
  • I’m turning my Pinterest into a professional account what should be my user name please try to think of a good name and not just
    11·2 answers
  • What types of tools are used in the process of a digital or network investigation?
    12·1 answer
  • The other term for template document is _______.
    13·2 answers
  • Name various input and output devices used with computers.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!