Advertisement
Josif_tepe

Untitled

Sep 18th, 2024
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. int main() {
  6.     int a, b, c;
  7.     cin >> a >> b >> c;
  8.     int x = abs(b - c) + c;
  9.    
  10.     if(a < x) {
  11.         cout << 1;
  12.     }
  13.     else if(x < a) {
  14.         cout << 2;
  15.     }
  16.     else {
  17.         cout << 0;
  18.     }
  19.     return 0;
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement