File I/O Exercise:
- Using the lab samples as a starting point, write a program called
lab4.cpp to input 10 float values from an input file
input.txt.
(Hint, you have to create the input.txt file yourself)
- Output the sum and the average of the 10 float values to an output file output.txt.
- Be sure to test to see if you opened the input and output files before you use them.
- Compile and run this C++ program.
- Run the program for your lab instructor and show the result in output.txt.
Copyright: Department of Computer Science, University of Regina.