Odpowiedzi

2009-12-12T14:33:14+01:00
#include <iostream>
using namespace std;

int main () {
int n;
cin >> n;
double *t = new double[n];
for (int i=0; i<n; ++i) cin >> t[i];

double sum = 0.0;
for (int i=0; i<n; ++i) {
sum += t[i];
cout << sum << "\n";
}

sum /= n;
cout << "Srednia: " << sum;

return 0;
}