double getAverage(const std::vector<int>& data) { double avg = 0; for (size_t i = 0; i < data.size(); ++i) { avg = avg + (data[i] - avg) /(i + 1.0); } return avg; }
double getAverage(const std::vector<int>& data) { double avg = 0; for (size_t i = 0; i < data.size(); ++i) { avg = avg + (data[i] - avg) /(i + 1.0); } return avg; }