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
Design and implement an application that reads an integer value representing a year from the user. The purpose of the program is
olga55 [171]

Answer :

Written in java

import java.util.Scanner;

public class Main{

   public static void main(String[] args) {

       int year;

       Scanner scanner = new Scanner(System.in);

       System.out.print("Please enter a year\n\n");

       year = scanner.nextInt();

       while (year < 1582) {

           System.out.print("\nPlease enter a different year above 1582\n");

           year = scanner.nextInt();

       }

       if (year % 4 == 0) {

           if(year % 100 ==0 && year % 400 != 0){

                   System.out.println(year + " is not a leap year\n\n");

           }else {

               System.out.println(year + " is a leap year\n");

           }

       } else {

           System.out.println(year + " is not a leap year\n\n");

       }

   }

}

4 0
3 years ago
You work with alot of different documents in your internship with a software development company. What kinds of actions can you
Doss [256]

Answer:

Explanation:

Try as much as possible, to keep like files together in one folder. Even so there if you run into the hundreds or thousands, that is not going to be an easy thing do.

What ever you do, do clutter up your favorites bar, especially if your favorites spill over into where you have to push a button to get to them. Keep that bar open for what you really need on that bar. Mine has Brainly, Kitco, My Alberta Health, A graphing program, a second graphing program, Amazon, a scrabble word finder, and a couple of other things. It

If you can, try and keep your favorites to something that would be useless to anyone else. My favorites are worthless to anyone else. But I play a lot of scrabble related games.

7 0
3 years ago
A cloud data storage company develops a proprietary system of hardware and software, trains its systems analysts on the technolo
cupoosta [38]

Answer:

Creating Strategic Fit

Explanation:

Strategic fit expresses the degree to which an organization is matching its resources and capabilities with the opportunities in the external environment. The matching takes place through strategy and it is therefore vital that the company has the actual resources and capabilities to execute and support the strategy. Strategic fit can be used actively to evaluate the current strategic situation of a company as well as opportunities such as M&A and divestitures of organizational divisions.

7 0
3 years ago
Does the security burden fall primarily on the user? On
liubo4ka [24]

Answer:

yes and no because of the security

Explanation:

yes and no because of the security

6 0
3 years ago
Hackers often argue that hacking is for the good of all people because it points out flaws in computer systems. do you agree wit
lutik1710 [3]
 "Hackers" who work for companies to expose security flaws are definitely good, they're helping protect systems, often referred to as "white-hat" hackers. Many companies hire people like these or offer bounties for such people who can find vulnerabilities. One could say that even without permission, people who hack with the intent of demonstrating holes in security or improving a service could be considered good.

However, I don't believe that as firstly, they are breaking the law, and secondly, they are stealing data and invading people's privacy. One might as well break into somebody's house to say their security is bad! 


7 0
3 years ago
Other questions:
  • A cpu with an external clock speed of 2 ghz and a 64-bit data bus can (theoretically) transfer how much data per second?
    8·1 answer
  • Which charges a fee for access to read, research, or copy articles and other published materials?
    11·1 answer
  • A user is troubleshooting a mobile device app that is displaying errors and has contacted the app manufacturer’s technical suppo
    14·1 answer
  • You share a number of files from your computer, and you've received a number of calls from users who say they can't connect to t
    5·1 answer
  • During the name resolution process, which technique is used to avoid congestion when querying a server
    8·1 answer
  • InJava garbage collection is done by_______________JVM (Java VirtualMachine)ProgrammerBoth JVM (Java Virtual Machine)and Program
    9·1 answer
  • Public classes are accessible by all objects, which means that public classes can be ____, or used as a basis for any other clas
    10·2 answers
  • You can enter _____ in a cell to display tomorrow’s date
    12·1 answer
  • How to create diagram that demonstrates the step<br> by step procedures in performing a mail merge.
    12·1 answer
  • Given that the input A is false, the input B is false, and the input C is true, what is the resulting value of the output?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!