Advertisement
Josif_tepe

Untitled

Dec 10th, 2021
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int px, py, a, b;
  8.     cin >> px >> py >> a >> b;
  9.     int tx, ty;
  10.     cin >> tx >> ty;
  11.     if (tx > px + a or tx < px or ty > py + b or ty < py)
  12.     {
  13.         cout << "nadvor" << endl;
  14.         return 0;
  15.     }
  16.     else if (ty == py + b or tx == px + a or ty == py or tx == px)
  17.     {
  18.         cout << "strana" << endl;
  19.         return 0;
  20.     }
  21.     else {cout << "vnatre" << endl;}
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement