subject

(Sum and average of a set of integers entered by the user) Write a Java program that reads an unspecified number of integers (but no more than twenty, total), determined how many of those were positive vs. negative, and computes the total sum and the average of the entered values. The program stops prompting the user to enter more integers once either 0 has been entered as input, or if there have been twenty entered (non-zero) values. You are encouraged, but not strictly required to use methods. Show the output of your Java program on five sets of inputs, total. Three sets are your choice, under the constraint that there should be at least five input non-zero values before the first 0 is encountered. The remaining two test runs should be on the following input sequences: 1 2-1 35 10 -5 -10 0 1 -1 2-2 3-3 4-4 5 -5 0

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:40
Write c function that can replace all the positive elements to 0 and negative to 1 in undefined length one-dimensional array. test your program in the main program by defining one-dimensional array of 6 elements
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
What is outfitting a workplace with video in a technology
Answers: 2
question
Computers and Technology, 23.06.2019 09:10
(328 inc. 448 ind. 480 in25. john has a collection of toy cars. he has 2 red cars, 4 blue cars, 4 black cars, and 6 yellowcars. what is the ratio of red cars to yellow cars? a. 1: 2b. 1: 3c. 1: 626. the net of a right triangular prism is shown below.
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 2
You know the right answer?
(Sum and average of a set of integers entered by the user) Write a Java program that reads an unspec...
Questions
question
Mathematics, 11.06.2021 20:50
question
Mathematics, 11.06.2021 20:50
question
Mathematics, 11.06.2021 20:50
question
Mathematics, 11.06.2021 20:50
question
Mathematics, 11.06.2021 20:50
question
Mathematics, 11.06.2021 20:50
Questions on the website: 13722363