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
sattari [20]
4 years ago
3

Given an int variable n that has already been declared, write some code that repeatedly reads a value into n, until at last a nu

mber between 1 and 10 (inclusive) has been entered. Assume the availability of a variable, stdin, that references a Scanner object associated with standard input. That is, stdin = new Scanner(System.in); is given.
Computers and Technology
1 answer:
Pepsi [2]4 years ago
7 0

Answer:

Hi!

var int n = 0; <em>// Initialize the variable n;</em>

stdin = new Scanner(System.in); // Instanciate the Scanner object.

n = stdin.nextInt(); <em>// It saves the first input before goes on the while loop.</em>

while( (n<1) && (n>10) ) {

    n = stdin.nextInt(); <em>// Keeps looping until a number between 1 and 10 (inclusive) has been entered.</em>

}

You might be interested in
Match the installation type to its description.
MariettaO [177]

Answer:

Following are the types of installation matched to its respective definitions.

<h3>Upgrade installation:</h3>

What you do when you have a computer with an existing operating system that needs to be upgraded.

This means that while working on a window when you get attracted by the update introduced recently and you upgrade your window accordingly.

For example: Updating a window from 8 to 10 or desired features.

<h3>Multiple boot installation:</h3>

What you do when you have several operating systems on one computer.

In this type of installation, a computer has different windows for different accounts. You can boot to the desired installed window by switching account.

<h3>Clean installation:</h3>

What you do on a brand new computer that has never been set up before and does not have an operating system on it yet.

It can be defined as the installation of window done very first time on to the computer. Sometimes when the window gets deleted due to virus or any other factor, the installation at that time will also be termed as Clean Installation.

<h2>I hope it will help you!</h2>
5 0
3 years ago
In order to paint a wall that has a number of windows, we want to know its area. Each window has a size of 2 ft by 3 ft. Write a
Oksana_A [137]

Answer:

The program in Java will be:

import java.util.Scanner;

public class Paint

{

   public static void main(String[] args)

   {

       final int COVERAGE = 350;  //paint covers 350 sq ft/gal

       final int DOOR = 20;

   final int WINDOW = 15;    

   //declare integers length, width, and height;

   int length, width, height, doors, windows;

   //declare double totalSqFt;

   double totalSqFt;

       //declare double paintNeeded;

   double paintNeeded;

     //declare and initialize Scanner object

   Scanner scan = new Scanner (System.in);

   //Prompt for and read in the length of the room

   // finish this -- length =  

   System.out.print("Enter the length of the room: ");

   length = scan.nextInt();

   //Prompt for and read in the width of the room

       System.out.print("Enter width: ");

   width = scan.nextInt();

       //Prompt for and read in the height of the room

   System.out.print("Enter height: ");

   height = scan.nextInt();

       //Prompt for and enter the number of doors    

   System.out.println("Enter the number of doors: ");

   doors = scan.nextInt();

   //Prompt for and enter the number of windows

   System.out.println("Enter the number of windows: ");

   windows = scan.nextInt();

   //Compute the total square feet to be painted--think

      //about the dimensions of each wall

       totalSqFt = 2 * width * height + 2 * length * height - DOOR*doors - WINDOW*windows;

       //Compute the amount of paint needed

       paintNeeded = totalSqFt / COVERAGE;

       //Print the length, width, and height of the room and the

       //number of gallons of paint needed.

   System.out.println("Length= " + length + "\nWidth= " + width +  "\nHeight= " + height + "\nNumber of doors: " + doors + "\nNumber of windows: " + windows + "\nGallons of Paint Needed= " + paintNeeded);

   

   }

}

5 0
4 years ago
Read 2 more answers
What factor(s) should be considered when determining whether a business is too far based on the query and the user location? Sel
polet [3.4K]

Answer:

Type of Business/entity and User Location are True.

User Intent and your judgment are False.

Explanation:

The following are the factors that treated at the time of deciding the following business is based on the too far query and the location of the user. So, That's why the first two factors are applied by the type of business or entity and the location of the user but the last two factors are not applied because it is not about the user, it is related to the firm or the business.

7 0
3 years ago
A(n) ____________ is a group of similar or identical computers, connected by a high-speed network, that cooperate to provide ser
scoundrel [369]

Answer:

cluster

Explanation:

A cluster in a computer system is a collection of servers and other resources that work together to provide high reliability and, in certain situations, load balancing and parallel processing.

6 0
2 years ago
Which of the three is not a popular cloud suite or online office suite?
SIZIF [17.4K]
C. Thinksmart - thinksmart only sells products and softwares of their own. Thinksmart is a online selling company that sells moslty softwares on their domain. Think smart is not a popular cloud suite or an online office suite. So the answer to your question is C.
3 0
4 years ago
Other questions:
  • Mitchell is assisting her teacher in a project by entering data into the spreadsheet. Which types of data can Michelle enter in
    14·2 answers
  • Which of the following is NOT an example of systems software?
    9·1 answer
  • What is a “spoof” of an ad ?
    8·2 answers
  • At what point is an idea protected by copyright?
    7·2 answers
  • For this exercise, you are given a phrase. Return the number of time the word “dog” appears in the phrase.
    7·1 answer
  • In the legend of sleeping Hallow what does Ichabod Crane fear the most
    13·2 answers
  • What is the best data structure to solve the following problem? a) A list needs to be built dynamically. b) Data must be easy to
    11·1 answer
  • Alyson would like to see a list of all of the applications installed on her computer. What is the easiest way for her to do this
    8·1 answer
  • Katrina needs to send her database to colleagues, but she does not want them to access anything except the
    8·1 answer
  • A scanner connected to your mac is giving problems and you suspect corrupted device drivers. What should you do first? second?.
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!