c 2b 2b average

Solutions on MaxInterview for c 2b 2b average by the best coders in the world

showing results for - "c 2b 2b average"
Giacomo
04 May 2017
1// Average of a float
2
3float avg(float numbers[]) {
4  
5	int arraylength = sizeof(arr)/sizeof(arr[0]);
6	float sum = 0;
7  	
8  	for (int i = 0; i < arraylength; i++) {
9    	sum += numbers[i];
10    }
11  
12  	return sum / arraylength;
13}