Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
288 B
0
Indexable
Never
#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;
}
Leave a Comment