CS110 Lab: EOF Loops
- Get a copy of the
This program uses file I/O to read four floating point values from the data
file inputfile.txt and writes the sum and average to the output file
Your assignment is to add the code to the while loop
to input a number, add it to the sum, and increment the counter.
Look at the comments in the program to see where to put this code.
- Complete the program according to the comments in the program.
- Use pico to create an input data file
- Compile and run this C++ program. The output will be in the file
Copyright: Department of Computer Science, University of Regina.