kilolilo

Untitled

Sep 21st, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.   int x1,y1,sh1,v1,x11,y11,sh2,v2;
  7.   x1=1;
  8.   y1=1;
  9.   sh1=2;
  10.   v1=2;
  11.  
  12.   x11=3;
  13.   y11=3;
  14.   sh2=2;
  15.   v2=2;
  16.   if (x1<=x11 && x1+sh1>=x11 && y1<=y11 && y1+v1>=y11){
  17.       cout<<"popal 1"<<endl;
  18.     }
  19.   if (x1<=x11+sh2 && x1+sh1>=x11+sh2 && y1<=y11 && y1+v1>=y11){
  20.       cout<<"popal 2"<<endl;
  21.     }
  22.   if (x1<=x11+sh2 && x1+sh1>=x11+sh2 && y1<=y11+v2 && y1+v1>=y11+v2){
  23.       cout<<"popal 3"<<endl;
  24.     }
  25.   if (x1<=x11 && x1+sh1>=x11 && y1<=y11+v2 && y1+v1>=y11+v2){
  26.       cout<<"popal 4"<<endl;
  27.     }
  28.  
  29. }
Add Comment
Please, Sign In to add comment