Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2022 Grenoble France September 19 23 2022 Proceedings Part 4 Lnai 13716

Authors: Massih-Reza Amini ,Stephane Canu ,Asja Fischer ,Tias Guns ,Petra Kralj Novak ,Grigorios Tsoumakas

1st Edition

3031264118, 978-3031264115

More Books

Students also viewed these Databases questions