Untitled
unknown
plain_text
2 years ago
603 B
10
Indexable
//дз 2.
#include <iostream>
using namespace std;
int main()
{
int a, b, c;
int pr = 0;
int vir = 0;
while (true)
{
cin >> a >> b >> c;
if (a == 0 && b == 0 && c == 0)
{
cout << "vsyo\n";
if (vir > pr)
{
cout << "Pobedili neobichniye.";
}
else if (pr > vir)
{
cout << "Pobedili obichniye.";
}
else
{
cout << "Pobedila dryzhba.";
}
return 0;
}
if (a == b + c || b == c + a || c == b + a)
{
cout << "yes\n";
vir = vir + a + b + c;
}
else
{
cout << "no\n";
pr = pr + a + b + c;
}
}
}Editor is loading...
Leave a Comment