L.A.14.2 o average

Lab Exercise

 

average

 

 

 

Background:

 

1.    Your instructor will provide you with a text file, Numbers.txt, containing a large (N <= 1000) amount of integers.  The integers range in value from 0 to 100.  The text file has been created with one value on each line.

 

2.    The number of integers in the file is unknown.  You must read the text file until the EOF marker is encountered.

 

3.    Your program must find the average of the list of numbers. 

 

4.    Because of the large amount of integers you will need to declare a total variable as a long integer.

 

 

 

Assignment:

 

1.    Your program should print out the average of the data in Numbers.txt.  Format the average to print with 2 decimal places.

 

2.    Turn in your source code and run output.