Question: Program One Write a C++ program, named average.cpp , that reads the values from a data file til the end of the data file is
Program One
Write a C++ program, named "average.cpp", that reads the values from a data file til the end of the data file is reached. It displays the values read, and computes and displays the largest, smallest, and the average of these values.
Important!
Since your program will be reading from a data file, first copy the data file into the project directory.
Assume the closed lab directory created for this lab is "CLA8" under the "CLA" directory, first change into that directory using "cd" command.
Then, type the following command: cp ~cen/data/lab8*.dat . This command copies the two data files (lab8-1.dat and lab8-2.dat) into your project directory.
To run the program using input redirect, type:
a.out
a.out


Here is an example run of the program when the data file to be opened is specified using the statement: Sample run 2 with command: a.out
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
