Question: 2. Develop a $mathrm{C} ++$ function with following function prototype: double fileavg(string fname); The function accepts the name of file as input and returns the

 2. Develop a $\mathrm{C} ++$ function with following function prototype: double

2. Develop a $\mathrm{C} ++$ function with following function prototype: double fileavg(string fname); The function accepts the name of file as input and returns the average of the numbers in that file (the file is assumed to contain numbers only). Write a $\mathrm{C}++$ main program that prompts the user to enter a file name that contains a set of numbers. The main program should calculate the average of the numbers in the file using the function fileAvg and display the returned value to the user. CS.VS.950|

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!