📅  最后修改于: 2022-03-11 14:44:45.611000             🧑  作者: Mango
// Average of a float
float avg(float numbers[]) {
int arraylength = sizeof(arr)/sizeof(arr[0]);
float sum = 0;
for (int i = 0; i < arraylength; i++) {
sum += numbers[i];
}
return sum / arraylength;
}