Advertisement
Filip13

isti kvadrant

Oct 14th, 2022
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. // ax ay bx by
  7. int x1, y1, x2, y2;
  8. cin >> x1 >> y1 >> x2 >> y2;
  9.  
  10. bool x_check = (x1 >= 0 && x2 >= 0) || (x1 <= 0 && x2 <= 0);
  11. bool y_check = (y1 >= 0 && y2 >= 0) || (y1 <= 0 && y2 <= 0);
  12.  
  13.  
  14. if (x_check && y_check)
  15. cout << "da";
  16.  
  17. else
  18. cout << "ne";
  19.  
  20.  
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement