making a array

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
1
2
3
4
5
6
7
8
9
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;
}
Last edited on
Thanks for pointing out my mistakes.
Last edited on
Topic archived. No new replies allowed.