Josif_tepe

Untitled

Nov 15th, 2025
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.     int a, b, c, d;
  7.     cin >> a >> b >> c >> d;
  8.     int temp = 0;
  9.     if ((a+b+c) % 2==0)
  10.     {
  11.         temp++;
  12.     }
  13.     if ((a+b+d) % 2 == 0)
  14.     {
  15.         temp++;
  16.     }
  17.     if ((a+c+d) % 2 == 0)
  18.     {
  19.         temp++;
  20.     }
  21.     if ((b+c+d) % 2 == 0)
  22.     {
  23.         temp++;
  24.     }
  25.     if (temp == 1)
  26.     {
  27.         cout << "+";
  28.     }
  29.     if (temp > 1)
  30.     {
  31.         cout << "?";
  32.     }
  33.     if (temp == 0)
  34.     {
  35.         cout << "-";
  36.     }
  37.     return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment