12345678910111213141516171819
#include <iostream> using namespace std; int main() { int size; cin >> size; int *array = new int [size]; double average=0; for(int i=0; i<size; i++) { cin >> array[i]; average = ( i*average +array[i]) / (i+1); } cout <<average; delete[] array; return 0; }