Write a program that reads in an unknown number of whole numbers (integers) from
ID: 3545863 • Letter: W
Question
Write a program that reads in an unknown number of whole numbers (integers) from a file (A3Q3.dat) and that outputs to the screen
- the numbers read 10 per line
- the sum of all the numbers
- the sum of all the numbers greater than zero
- the sum of all the numbers less than zero
- the average of all the numbers
- the average of the positive numbers
- the average of the negative numbers
- the count of positive numbers
- the count of negative numbers
- the count of zeroes
- the total count of all whole numbers in the file in the file.
You need to account for the possibility that the file is empty. (See figure XX)
Figure 3 shows you a sample output. The format of your output does not have to be identical to the one in figure 3, but it must contain the same information.
Explanation / Answer
Solution to yr code is easy.....but time consuming.....
increase the time......as i m working on yr code
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.