CSC 172 - Introduction to Algorithms and Data Structures

Dr. R. M. Siegfried

Assignment #12 - Finding the Average of Numbers stored in a text file.

Due Friday, April 11, 2014

Write a program that will ask the user for a file name. Contained in this file is a series of integers separated by white space. Read in the numbers, displaying them on the screen, adding them up and then calculating their average.

Please remember that you will have to create the input file and it is easiest to read it if you use its entire path name, i.e., "a:\\input.txt".

[Back to the Assignments List]