Question: ( CPP ) You have a stream of integers coming in from the input device. The integers are in random order. Some are positive, some

(CPP)
You have a stream of integers coming in from the input device. The integers are in random order. Some are positive, some are negative; only the last is zero.
(a) Write a program using functions to output the following:
the number of positive numbers
the number of negative numbers
the sum of the positive numbers
the sum of the negative numbers
the total number of numbers
the grand total of all the numbers
(b) Use functions to break down the problem and to make your program easy to follow (readable).

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 Programming Questions!