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
Get step-by-step solutions from verified subject matter experts
