S001-AC.cc 252 Bytes Edit Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include <iostream> #include <iomanip> using namespace std; int main() { double d,sum=0; int n=0; do { cin >> d; if(cin.eof()) { break; } sum += d; n++; }while(1); cout << fixed << setprecision(2) << sum/n << endl; return 0; }