File I/O Exercise:
- Get a copy of the
The purpose of this program is to demonstrate how to use File I/O.
It will read four floating point values for the input data file and
output these numbers to another file in reverse order.
- Use pico to create the input data file inputfile.txt
with four float type values.
- Compile and run this C++ program.
- Modify the program to make it also output the average of the four input
numbers to the output file.
- View the output file by using cat outputfile.txt.
Copyright: Department of Computer Science, University of Regina.