Write a function that returns the average of the grades given in an array.


Difficulty level
Video recording
This exercise is mostly suitable for students
double average(int TAB[], int N)
{
	int i = 0;
	long SUM = 0;
	while (i<N)
	{
		SUM += TAB[i];
		i++;
	}
	return 1.0*SUM/N;
}

Back to the list of exercises
Looking for a more challenging exercise, try this one !!
Divisibility by 9