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
Tpy6a [65]
4 years ago
9

"Write a loop that reads positive integers from console input, printing out those values that are greater than 100, and that ter

minates when it reads an integer that is not positive. The values should be separated by single blank spaces. Declare any variables that are needed."
Computers and Technology
1 answer:
iogann1982 [59]4 years ago
4 0

Answer:

import java.util.Scanner;

public class num10 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int num;

       String nums =" ";

        do{

           System.out.println("Enter positive numbers");

           num = in.nextInt();

           if(num>100){

              nums = nums+num+" ";

           }

       }while(num>0);

       System.out.print(nums);

   }

}

Explanation:

  • The implementation is in Java programming language
  • Import SCanner and create an object of it to receive user input
  • Create an int variable num to hold the values of num
  • Create another variable a string to hold numbers greater than 100
  • Using a do-.....while statement, continually prompt a user for a number, loop terminates whenever number is less than or equal to zero
  • Within the do.....while statement, add any value of num that is greater than 100 using an if statement.
You might be interested in
Describe under what workloads c-scan would be preferred over c-look?
Gelneren [198K]

Many filesystems attempt to logically group inodes together in an attempt to keep data close together on the disk. Consider a file system configuration of 1KB size blocks, 16384 blocks/group, and 4096 inodes/group, with each inode sized 128 bytes.

3 0
3 years ago
On Election Day, TV news network Houston News One is trying to project the 2018 Texas election results. They send pollsters to 4
Leni [432]

Answer:

entrance poll

Explanation:

Based on the information provided within the question it seems that the type of poll that the news network is conducting is an entrance poll. This refers to asking question (poll) to people outside of the voting center before they enter to place their vote as opposed to exit poll which is done after the individual has placed their vote.

8 0
3 years ago
mips Write a program that asks the user for an integer between 0 and 100 that represents a number of cents. Convert that number
Mumz [18]

Answer:

Explanation:

The following code is written in python and divides the amount of cents enterred in as an input into the correct amount of quarters, dimes, nickels and pennies. Finally, printing out all the values.

import math

#First we need to define the value of each coin

penny = 1

nickel = 5

dime = 10

quarter = 25

#Here we define the variables to hold the max number of each coin

quarters = 0

dimes = 0

nickels = 0

pennys = 0

cents = int(input("Please enter an amount of money you have in cents: "))

if cents > 0 and cents <= 100:

   if cents >= 25:

       quarters = cents / quarter

       cents = cents % quarter

   if cents >= 10:

       dimes = cents/dime

       cents = cents % dime

   if cents >= 5:

       nickels = cents /nickel

       cents = cents % nickel

   if cents > 0:

       pennys = cents / penny

       cents = 0

   print("The coins are: "

       "\nQuarters", math.floor(quarters),

       "\nDimes", math.floor(dimes), "\nNickels", math.floor(nickels), "\nPennies", math.floor(pennys))

else:

   print("wrong value")

8 0
3 years ago
The New option is found in the ...............tab.​
morpeh [17]

in your notes books and in your vopy

3 0
3 years ago
Read 2 more answers
Can anybody give me any suggestions to what my pfp should be
Julli [10]

Answer:

— Your profile picture can be one of the most important elements of ... but your photo should give candidates a clear idea of what you'd ... They might also help to direct you a bit, like telling you to tilt your head slightly or tuck your ...

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which IT job role best describes an individual who develops primarily server-side Web applications?
    15·1 answer
  • Emma has decided that she needs to assess the risk and return of buying an extended warranty for her new laptop for school
    15·1 answer
  • Stanford Rosenberg Computing wants to establish an assembly line for producing a new product, the Personal Digital Assistant (PD
    7·1 answer
  • What prefix describes a mass that is 1000 times smaller than a gram
    5·2 answers
  • Write a C++ program using a do while loop for (Find the highest score). The program should work for any number of students. Run
    10·1 answer
  • 40 POINTS IF YOu ANSWER FOR EACH STEP.
    13·1 answer
  • Suppose you have a primary location in New York City where you main corporate servers are located. Just in case something happen
    5·1 answer
  • Which type of software is primarily used to organize a collection of information for easy access?
    15·1 answer
  • What is your favorite photograph in the presentation? Why?
    12·1 answer
  • Which of the following is true about named ranges?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!