Untitled
unknown
c_cpp
2 years ago
1.3 kB
2
Indexable
#include <iostream> using namespace std; int main(){setlocale(LC_ALL, "russian"); int cycles; cin >> cycles; float marks = 0; float ball = 0; for (int i = 0; i<cycles; i++) { cin >> marks; ball += marks; } if(cycles!=0) { ball /= cycles; } float ball2 = int(ball); float ball3 = (ball - int(ball)) * 10; if(ball2 == 2) { if(ball3 >=5) { cout << "троечник >:("; } else { cout << "двоечниииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииик"; } } if (ball2 == 3) { if (ball3 >= 5) { cout << "ХОРОШИСТ"; } else { cout << "троечниниииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииик"; } } if (ball2 == 4) { if (ball3 >= 5) { cout << "отличник"; } else { cout << "пойдёт хорошист"; } } if (ball2 >= 5) { cout << "уважение от сталина"; }}
Editor is loading...
Leave a Comment