Untitled

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

int main() {
	setlocale(LC_ALL, "Russian");
	int n, a, b = 0, c = 0;
	float d;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a;
		b += a;
		c += 1;
	}
	d = float(b) / c;
	if (d > 2.0 and d < 2.5) {
		cout << "Ты двоечник";
	}
	if (d >= 2.5 and d < 3.5) {
		cout << "Ты троечник";
	}
	if (d >= 3.5 and d < 4.5) {
		cout << "Ты хорошист";
	}
	if (d >= 4.5 and d <= 5.0) {
		cout << "Ты зубрила";
	}
}
Leave a Comment