Count positive and negative number and compute the average. The program will have the user input an unspecified number of integers.
Determine how many are positive and negative.
Compute the total and average. Use a while loop.
Output as follows:
Enter an integer, the input ends if it is 0: 1 2 - 1 3 0
The number of positives: 3
The number of negatives: 1
The total is 5.0
The average is 1.25
+1
Answers (1)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Count positive and negative number and compute the average. The program will have the user input an unspecified number of integers. ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Home » Computers & Technology » Count positive and negative number and compute the average. The program will have the user input an unspecified number of integers. Determine how many are positive and negative. Compute the total and average. Use a while loop.