Answer:
The function is as follows:
double testAverage(double n1, double n2, double n3, double n4){
double small = findLowest(n1,n2,n3,n4);
double total = n1 + n2 + n3+ n4 - small;
double ave = total/3;
return ave;
}
Explanation:
This defines the function
double testAverage(double n1, double n2, double n3, double n4){
This calls the findLowesr function and save the smallest in variable small
double small = findLowest(n1,n2,n3,n4);
This calculates the sum of the largest 3
double total = n1 + n2 + n3+ n4 - small;
This calculates the average of the largest 3
double ave = total/3;
This returns the calculated average
return ave;
}
Note that: I assume that function findLowest exists (according to the question).