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
A CPU has 32 KB cache, 2-way set associative, 16-byte block size. How many bits are required to use index each set in this cache
LenKa [72]

Answer:

10 bits

Explanation:

Cache size = 32 KB

We were also given that it is 2 way set associative

Block size = 16 bytes = 2^4 = 4 bits for offset

Number of blocks = cache size / block size = (32*2^10) / 16

=2^11

Hence, index = number of blocks / 2 (since 2 way associative)

=(2^11)/2 = 2^10 = 10 bits for index

7 0
3 years ago
____ is a technique for confirming that q received packet or frame is likely to match what was sent
hammer [34]

Answer:

C. Error checking

Explanation:

I hope this helps

6 0
2 years ago
Which of the following is a special-purpose computer that functions as a component in a larger product?
Dominik [7]

Answer:  

Embedded Computer

Explanation:

  • An embedded computer is designed to perform a certain function and it is a component of a larger system.
  • An embedded computer has a dedicated function within a larger system and is incorporated as a part of a complete system rather than being a stand alone computer.
  • It is a microprocessor, micro controller based real time control system.
  • Its a combination of hardware and software that have a dedicated function to achieve a specific task. The also have peripheral devices for communication purposes.  
  • Digital Camera , ATM, Calculator, Digital Watch , Self-autonomous Vehicles, Security Camera , Washing Machine , Mp3 player, Microwave Oven , Fire Alarm, Smart Phone,Vending Machines, networking hardware like dedicated routers etc are examples of embedded systems.
  • Embedded computers are less expensive to produce, consumes less power, easier to maintain, do not require remote maintenance and easily customizable.

4 0
3 years ago
Which layer defines an interface that applications can use to request network services, rather than referring directly to applic
Scrat [10]
Explain what is meant by a limited data set and how this HIPAA rule may affect medical assistants
4 0
3 years ago
Using C#, declare two variables of type string and assign them a value "The "use" of quotations causes difficulties." (without t
stich3 [128]

Answer:

Let the two string type variables be var1 and var2.  The value stored in these two variables is : The "use" of quotations causes difficulties.

  • The variable which uses quoted string:

          string var1 = "The \"use\" of quotations causes difficulties.";  

  • The variable which does not use quoted string:

string var2 = "The " + '\u0022' + "use" + '\u0022' + " of quotations causes difficulties.";

  • Another way of assigning this value to the variable without using quoted string is to define a constant for the quotation marks:

const string quotation_mark = "\"";

string var2 = "The " + quotation_mark + "use" + quotation_mark + " of quotations causes difficulties.";

Explanation:

In order to print and view the output of the above statements WriteLine() method of the Console class can be used.

   Console.WriteLine(var1);

   Console.WriteLine(var2);

In the first statement escape sequence \" is used in order to print: The "use" of quotations causes difficulties. This escape sequence is used to insert two quotation marks in the string like that used in the beginning and end of the word use.

In the second statement '\u0022' is used as an alternative to the quoted string which is the Unicode character used for a quotation mark.

In the third statement a constant named  quotation_mark is defined for quotation mark and is then used at each side of the use word to display it in double quotations in the output.

8 0
3 years ago
Other questions:
  • (011001111)2=(?)10 can anyone solve this urgent <br><br> Hurry
    11·2 answers
  • What is a bug?
    11·2 answers
  • Which method is used for resolving data dependency conflict by the compiler itself?
    6·1 answer
  • Doctors at a regional hospital access an online database of patient records that is being developed and tested by a conglomerate
    13·1 answer
  • On the Format tab, which group allows you to select a different font for a chart?
    7·2 answers
  • Help plz,l didn’t pay attention in class
    7·1 answer
  • Suppose cell C5 contains the formula =B$6+C1.
    6·1 answer
  • You wrote a program to compare the portion of drivers who were on the phone. Which statements are true? Select 4 options.
    12·1 answer
  • Which statement is true?
    13·2 answers
  • Define the terms network, LAN, WAN, and Internet.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!