Question: 12) Given: struct Stats{ int min; int max; double avg; }; Write a function that finds the min, max, and avg of some given array,

12) Given:

struct Stats{ int min; int max; double avg; }; 

Write a function that finds the min, max, and avg of some given array, and returns the calculated values in a struct like the one above.

Also, write a constructor for the Stats struct to initialize it's data members with correct values. Pay attention to data types.

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!