I have to write a function called calcMean that accepts an array of doubles named data and returns the simple average (mean) of the data elements i need help doing this please help me thank you
double calcMean(double A[], int arraySize)
{
double sum = 0;
for (int i = 0; i < arraySize; i++)
sum += A[i];
double mean = sum/arraySize;
return mean;
}