Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
364 B
0
Indexable
Never
#include <iostream>
using namespace std;

int main() {
	setlocale(LC_ALL, "Russian");
	int n, count = 0, summ = 0, b;
	float g;
	cin >> n;
	const int m = 100;
	int mas[m];
	for (int i = 0; i < n; i++) {
		cin >> b;
		mas[i] = b;
	}
	for (int i = 0; i < n; i++) {
		summ += mas[i];
		count += 1;
	}
	g = float(summ) / float(count);
	cout << g;
}
Leave a Comment