1 #include "ex09.h" 2 3 double arithmetic_mean(double *arr, size_t len) 4 { 5 if(arr == NULL) return -1; 6 7 double sum = 0; 8 for(size_t i = 0; i <= len; i++) 9 sum += arr[i]; 10 11 return (sum / (len + 1)); 12 }
9511_workbooksolved exercises from algorithms & programming I (9511) prof. Cardozo |