subject

Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, and computes the total and average of the input values (not counting zeros). Your program ends with the input 0. Display the average as a floating-point number. Sample Run 1 Enter an integer, the input ends if it is 0: 1 2 -1 3 0 The number of positives is 3 The number of negatives is 1 The total is 5.0 The average is 1.25 Sample Run 2 Enter an integer, the input ends if it is 0: 0 No numbers are entered except 0 Sample Run 3 Enter an integer, the input ends if it is 0: 2 3 4 5 0 The number of positives is 4 The number of negatives is 0 The total is 14 The average is 3.5 Sample Run 4 Enter an integer, the input ends if it is 0: -4 3 2 -1 0 The number of positives is 2 The number of negatives is 2 The total is 0 The average is 0.0

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
What role do chromosomes play in inheritance?
Answers: 1
question
Computers and Technology, 22.06.2019 19:00
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
question
Computers and Technology, 23.06.2019 06:10
The head restraint should be adjusted so that it reaches a.the top of your ears b.the base of your skull c.the top of the head
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe and
Answers: 1
You know the right answer?
Write a program that reads an unspecified number of integers, determines how many positive and negat...
Questions
question
Social Studies, 25.05.2021 22:20
question
Social Studies, 25.05.2021 22:20
question
Arts, 25.05.2021 22:20
question
Mathematics, 25.05.2021 22:20
question
History, 25.05.2021 22:20
question
Mathematics, 25.05.2021 22:20
question
Mathematics, 25.05.2021 22:20
Questions on the website: 13722363