Question: Using C++ 5. Average excluding max and min (10 points] Write a function with the following signature: float trimmed_average(float values[], int size) Your function should

Using C++

Using C++ 5. Average excluding max and min (10 points] Write a

5. Average excluding max and min (10 points] Write a function with the following signature: float trimmed_average(float values[], int size) Your function should take in an array of float, along with its size, and it should return the average, without taking the maximum and the minimum into account. Example Input: [4000, 3000, 1000, 2000] Output: 2500 Explanation: If we exclude the maximum and the minimum values, then the list is (3000, 2000], so the average is 2500

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!