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
Elanso [62]
3 years ago
9

write a loop that reads positive integers from standard input, printing out those values that are greater than 100, each followe

d by a space, and that terminates when it reads an integer that is not positive. declare any variables that are needed. assume the availability of a variable, stdin, that references a scanner object associated with standard input.
Computers and Technology
1 answer:
oksian1 [2.3K]3 years ago
6 0

The code below is in Java.

It uses a do-while loop to get the inputs from the user, checks if they are greater than 100 using if-else structure, and appends them to the result String along with a space

Comments are used to explain the each line.

The output can be seen in the attachment.

//Main.java

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

    //Scanner object to be able to get input from the user

    Scanner input = new Scanner(System.in);

   

    // Declaring the variables

    int number;

    String result = "";

   

    //Creating a do-while loop that iterates while number is greater than 0

    //Inside loop, get the number and check if it is greater than 100

    //  If it is, append the number to the result String along with a space

    do{

        number = input.nextInt();

        if(number > 100)

            result += number + " ";

    }while(number > 0);

   

    //Print the result

 System.out.println(result);

}

}

You may check a similar one at:

brainly.com/question/15020260

You might be interested in
There are 3 parts to an osha inspection. What are they
vovikov84 [41]

1)<u> </u><u>An opening conference. The opening conference is a brief meeting during which the OSHA inspector will explain the purpose of the inspection.</u>


2) <u>A worksite “walkaround” The walkaround is the actual inspection.</u>


3) <u>A closing conference.</u>

6 0
3 years ago
Explain the purpose of Data Layer, in the Layered modelfor web applications?
matrenka [14]

Answer:

Purposes of Data Layer, in the Layered model for web applications are as following:-

1. The data Layer,is the third layer and it takes care of the all the operations concerning the database level.

2. This data layer gets a command from the application layer to send a query to the database and will process this command according to the type of database that is used.

3. It will ensure that the correct connections to the database are set.

4. It is represented by the Database.

7 0
3 years ago
Which of the following cannot be copyrighted? a. books b. inventions c. videos d. music
natita [175]
Well books, videos and music can all be copyrighted (I believe) so the logical answer would be b. inventions. Hope this helps.
7 0
3 years ago
How many Little mermaid movies are there? I know there is little mermaid 1 and 2, but I am not sure how many total movies there
kupik [55]
There have only been 3 Little Mermaid movies. 

<span>1. The Little Mermaid (1989) </span>
<span>2. The Little Mermaid 2 Return to the Sea (2000) </span>
<span>3. The Little Mermaid 3 Ariel's Beginning (2008)

hope this helps you(:

if not plz let me know (:

have a good day 
-denis</span>
7 0
3 years ago
Read 2 more answers
You want to discard your old computer and want to securely erase the data from your hard drive. What program can you use to do t
shtirl [24]

one thing you could do is a factory reset, but that depends on your system

5 0
4 years ago
Other questions:
  • Rori is looking for a way to interact with others while increasing her stamina. Which community resource would be least helpful
    13·1 answer
  • When activating windows, which type of volume activation is used to activate multiple windows systems, but must be individually
    12·1 answer
  • When the increment or decrement operator is placed before the operand (or to the operand's left), the operator is being used in
    6·1 answer
  • Computers store temporary Internet files in the Recycle Bin. These files take up space and slow down a computer. Which tool can
    10·1 answer
  • Write SQL statements for the following: 1. 2. 3. Change the column Z of a table XYZ to now acceptdefault value 9999 Delete a tab
    8·1 answer
  • Your organization network diagram is shown in the figure below. Your company has the class C address range of 199.11.33.0. You n
    8·1 answer
  • In matlab how would this specific code be written and how could I ask the user to enter a vector of coefficients for the polynom
    10·1 answer
  • Does anyone know 7.1.3: Firework karel?
    5·1 answer
  • Decision support systems help managers use structured data to identify problems and find solutions to business-related problems.
    10·1 answer
  • What year did polaroid introduce one-step photography with the SX-70
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!