Question: Write a program that will read data from the file p6.txt. The file (that you will create) always contains 15 test scores (whole numbers between

Write a program that will read data from the file "p6.txt". The file (that you will create) always contains 15 test scores (whole numbers between 0 and 100). The test scores are scores for 5 students taking 3 tests, and are arranged, in the file, by the student - that is the first 3 numbers are the test scores for test 1, 2, and 3 for the first student, etc.
The program will print:

  1. - average per student (5 averages), on a single line, with 2 decimals
  2. - average per test (3 averages), on a single line, with 2 decimals
  3. - overall best score on a single line
  4. - HOW MANY SCORES WERE Fs(out of the 15, how many were at most 59) on a single line


To simplify the code, no validations are needed. That is, assume the file is successfully opened, and that all data are 0-100, and that there are exactly 15 numbers in the file.

Step by Step Solution

3.42 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure Lets walk through how we could write a program to achieve these goals Ill provide a stepbystep ... View full answer

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!