Untitled

mail@pastecode.io avatar
unknown
c_cpp
13 days ago
699 B
1
Indexable
Never
#include <iostream>
using namespace std;

int main() {
	setlocale(LC_ALL, "Russian");
	int a = 1, b = 1, c = 1, v = 0, n = 0;
	while (a != 0 and b != 0 and c != 0) {
		cin >> a >> b >> c;
		if (a > b and a > c) {
			if (b + c == a) {
				v = (b + c + a);
			}
			else {
				n = (a + b + c);
			}
		}
		if (b > a and b > c) {
			if (a + c == b) {
				v = (b + c + a);
			}
			else {
				n = (a + b + c);
			}
		}
		if (c > b and c > a) {
			if (b + a == c) {
				v = (b + c + a);
			}
			else {
				n = (a + b + c);
			}
		}
	}
	if (n > v) {
		cout << "Победа невырожденных!";
	}
	else {
		cout << "Победа вырожденных!";
	}
}
Leave a Comment