Question: Suppose the input file scores.txt contains the following integer values: 92 0 88 100 60 42 0 67 Write a C++ program that first opens
Suppose the input file "scores.txt" contains the following integer values:
92
0
88
100
60
42
0
67
Write a C++ program that first opens the file "scores.txt", inputs the values, counts, computes the average, and outputs the following:
# students: 8
# non-zero: 6
# with 100: 1
Average: 74.8333
The 0's are not included in the average. In general, assume the input file contains 1 or more valid integers in the range 0..100, inclusive.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
