#include <iostream>
using namespace std;
double getAverage(int arr[], int size) {
int i, sum = 0;
double avg;
for (i = 0; i < size; ++i) {
sum += arr[i];
}
avg = double(sum) / size;
return avg;
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265467.html