Untitled
unknown
c_cpp
2 years ago
288 B
6
Indexable
#include <iostream>
using namespace std;
int main()
{
float n;
float res = 0;
cin >> n;
float mas[200];
for (int i = 0; i < n; i++) {
float a;
cin >> a;
mas[i] = a;
}
for (int i = 0; i < n; i++) {
res += mas[i];
}
res = res / n;
cout << res;
}Editor is loading...
Leave a Comment