Question: Using basic c++ 2. Count the positive and negative numbers using ***while loop*** Write a program that reads unspecified number of integers , determines how

Using basic c++

2. Count the positive and negative numbers using ***while loop***

Write a program that reads unspecified number of integers , determines how many negative and positive values have been read. Also calculate total and average. Your program will end with input 0.

Output

Enter an integer, the input ends if it is 0: 25 34 -89 72 -35 -67 21 48 0

The number of positives is 5

The number of negatives is 3

The total is 9

The average is 1.125

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!