Untitled
unknown
plain_text
2 years ago
583 B
6
Indexable
//домашка
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int n, a, s;
cin >> n;
s = 0;
int y = n;
while (y > 0)
{
y--;
cin >> a;
s += a;
}
double v = (double)s / n;
if ((v)-((int)v) >= 0.5)
cout << (int)v + 1;
else
cout << (int)v;
if ((int)v <= 2)
cout << "Dvoechnik";
if ((int)v == 3)
cout << "Troechnik";
if ((int)v == 4)
cout << "Horoshist";
if ((int)v == 5)
cout << "otlicnik";
return 0;Editor is loading...
Leave a Comment