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
_ is the adherence to a personal code of principles.
trapecia [35]

Answer: Ethics

Explanation:

 Ethics is the basic principle for the personal code. The code of the ethics is basically designed for outline the values in the organization with honesty and integrity.

The ethics is basically depend upon the principle of core value of the organization. The code of the ethics basically guide the core value in the organization and breaking the rule of ethics can also cause termination from the organization.

Morality, integrity and honesty are all the sub part of the ethics vale in the organization. Therefore, ethics is the correct option.  

3 0
4 years ago
There is a file "IT4983" in my home (personal) directory. I don’t know my current working directory. How can I find out the file
RoseWind [281]

Answer and Explanation:

Find / -name "IT4983"

See what it will do is it will find the file named IT4983 in the root directory.

run this commmand with sudo just in case for permission issues.

then it will give you the location of that file we want to find.

 

Or

$ file /home/IT4983 ( you can type this command from whichever directory you are )

output : IT4983 , ASCII TEXT

3 0
3 years ago
What is a data dictionary, what does it contain, and how is it used?
seropon [69]
A data dictionary<span> is a collection of descriptions of </span>data<span> objects or items in a </span>data <span>model for the benefit of programmers and others who need to refer to them. The first step in analyzing a system of objects with which users interact is to identify each object and its relationship to other objects.</span>
7 0
3 years ago
What are some qualities needed by computer support specialists
deff fn [24]
A bachelor's degree is required for some computer support specialist positions, but an associate's degree or postsecondary classes may be enough for others.
5 0
3 years ago
Hy does a bus network need regular hubs if it is to cover very much ground?
Norma-Jean [14]
A bus network can only accommodate a number connections and a limited area. If there were more hubs connected to the bus network, the coverage of the network would be expanded and the number of connections will also be increased.
7 0
3 years ago
Other questions:
  • Consider the following program segment. ifstream inFile; //Line 1 int x, y; //Line 2 ... //Line 3 inFile &gt;&gt; x &gt;&gt; y;
    13·1 answer
  • Which of the following would an interactive media proffessional must likely need
    9·1 answer
  • Your company has just opened an office in another state and you need the computers to communicate between the offices. What type
    13·1 answer
  • What is interest? How does interest affect credit card purchases?
    11·1 answer
  • Select the online reading comprehension tool that best fits the description. This tool lets users change text from one language
    6·2 answers
  • Motivational appeals refer to
    15·1 answer
  • What is the purpose of a system call in an operating system?
    10·1 answer
  • What solicits online input such as product ratings from consumers?
    7·1 answer
  • Pleaseeeeeeee tellllllllllllllllllllll​
    8·1 answer
  • ______ provide visual representations of the options available for a given command
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!