Site hosted by Angelfire.com: Build your free website today!

Program 30
C++Program 30

C++

K. Dzwonkiewicz

 

 

 

 

Write a program that will recover test scores stored in a data file called  test.dat

 

You do not know how many scores there are in the file.  Also, there is not a flag at the end of the file.  Read the numbers, adding them as you read, and print them out with the average.

 

You must create a practice file for yourself to debug your code.  When you are ready to get you sheet signed, you will use the test.dat file located in the common folder.

 

Sample run…

___________________________________________________________________

Data retrieved from file: test.dat

 

Class tests: 80, 90, 70, 76, 65, 45, 67, 87, 77, 66, 36, 86, 91

 

Average: 72.00

___________________________________________________________________