double computeAverage(int a[], double length){ double total = 0; for(int i = 0; i < length; i++) { total += a[i]; } return total / length; }