Untitled
#include <iostream> using namespace std; int resv = 0; int reso = 0; int main() { setlocale(LC_ALL, "Russian"); int a = 1, b = 1 , c = 1; while (a != 0 and b != 0 and c != 0) { cin >> a >> b >> c; if (a+b != c and a+c != b and b+c != a) { reso += a + b + c; } if (a + b == c) { resv += a + b + c; } if (c + b == a) { resv += a + b + c; } if (a + c == b) { resv += a + b + c; } } if (resv > reso) { cout << "победа вырожденных треугольников"; } if (reso > resv) { cout << "победа правильных треугольников"; } }
Leave a Comment