Răspuns:
#include <iostream>
#include <iomanip>
using namespace std;
int v[100000];
int main()
{
int n, i;
float suma = 0, media = 0;
cin >> n;
for (i = 1; i <= n; i++)
{
cin >> v[i];
suma += v[i];
}
media = suma / n;
cout << setprecision(3) << media;
return 0;
}