Double calulateAverage(double array[], int arrayLength){
double result = 0;
for (int i = 0; i < arrayLength; i++){
result+= array[i];
}
return result / arrayLength;
}
#include
double calculateGeometricMean(double array[], int arrayLength){
double result = 1;
for (int i = 0; i < arrayLength; i++){
result *= array[i];
}
return pow(result, 1.0 /arrayLength);
}