velimir

tocka

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