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
Among the second generation home console companies,which managed to come out on top
crimeas [40]

Answer:

The second generation of home consoles occurred from (1976-1988) at this time the most popular and consoled regarded as best was the Atari 2600

Explanation:

answer from Cligon768 on this site

3 0
4 years ago
Shelby wants to move “ExpirationDate” to the top of the datasheet. What should she do?
12345 [234]
Select row for "ExpirationDate", click the mouse and drag the field until the blue line appears above "Scent," and release the mouse button.
4 0
3 years ago
Have you ever tried using such a camera?​
guapka [62]

Answer: yeah i mean i use my canon camera

Explanation:

7 0
3 years ago
Driving while wearing headphones or earphones
soldi70 [24.7K]
Driving while wearing earphones
3 0
4 years ago
Read 2 more answers
Most of the Desktop games contain a backdoor used to test and update the game.
sveta [45]

A backdoor is a typically covert method of bypassing normal authentication or encryption in a computer, product, embedded device (e.g. a home router), or its embodiment (e.g. part of a cryptosystem, algorithm, chipset, or even a "homunculus computer" —a tiny computer-within-a-computer such as that found in Intel's AMT technology).Backdoors are most often used for securing remote access to a computer, or obtaining access to plaintext in cryptographic systems. From there it may be used to gain access to privileged information like passwords, corrupt or delete data on hard drives, or transfer information within autoschediastic networks.

the answer is True

i hope it will help you

8 0
3 years ago
Other questions:
  • Colours in art packages are often given Hex codes as illustrated below with #00ccff. Why is Hex used in this way rather than the
    11·1 answer
  • Difference between query and filter<br><br>​
    12·1 answer
  • __________ is a protocol used by e-mail clients to download e-mails to your computer.
    14·1 answer
  • 4.3 Code Practice<br> edhisve
    13·1 answer
  • Mikhail is working in an IDE and needs to test a program one step at a time to find and fix errors. What tool should he use?
    7·1 answer
  • I need ur oppinion about this paragraph.
    10·2 answers
  • Joe a frequent visitor to a branch office attempts to connect his tablet to the office wireless network but is unable to connect
    14·1 answer
  • Which of the following is a quality of a mixed economy?
    5·1 answer
  • I will make you brainless just answer all this question!!​
    14·1 answer
  • Write pseudo code that performs the following: Ask a user to enter a number. If the
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!