Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started