subject

Statistics are often calculated with varying amounts of input data. Write a program that prompts for and takes any number of non-negative integers as input, and outputs the average and max. A negative integer ends the input and is not included in the statistics. Example program run (the user types only the numbers, in this case 15 20 0 5 -1):

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:00
Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive. after the loop terminates, it prints out, on a line by itself and separated by spaces, the sum of all the even integers read, the sum of all the odd integers read, a count of the number of even integers read, and a count of the number of odd integers read, all separated by at least one space. declare any variables that are needed. 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.
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
The "instance" relationship shows that something is an object of a
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
What are the 12 colors of the spectrum called?
Answers: 1
You know the right answer?
Statistics are often calculated with varying amounts of input data. Write a program that prompts for...
Questions
question
English, 12.01.2022 18:30
question
Mathematics, 12.01.2022 18:30
question
Mathematics, 12.01.2022 18:30
question
English, 12.01.2022 18:40