Question: This assignment is similar to the assignment #6 with some modifications. Instead of calculating average, minimum, and maximum in the main) function, you need write

 This assignment is similar to the assignment #6 with some modifications.

This assignment is similar to the assignment #6 with some modifications. Instead of calculating average, minimum, and maximum in the main) function, you need write three separate functions to calculate them. The prototypes of the three function are as follows. int calc min(string file name, int total num); // returns min of integers in file name int calc max(string file name, int total num); // returns max of integers in file name nt calc avg(String file name, int total num); // returns average of integers in file name The parameter file name is the name of the file that contains the integers. The total num contains the total number of integers in the file. In the main() function, prompt the user to input both the file name containing the integers, and the total number of integers in the file. Then call the three functions (with appropriate arguments) to calculate average, min, and max and output the value returned by the functions To open the file, use infile.open(file _name.c _str0) where infile is an object of type ifstream Please submit your source code to eLearning

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!