kilolilo

Untitled

Sep 22nd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.00 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main(){
  5.   float x1,y1,sh1,v1,x11,y11,sh2,v2;
  6.   x1=0;
  7.   y1=0;
  8.   sh1=4;
  9.   v1=3;
  10.  
  11.   x11=1.5;
  12.   y11=-2;
  13.   sh2=4.5;
  14.   v2=6.5;
  15.   if (x1<=x11 && x1+sh1>=x11 && y1<=y11 && y1+v1>=y11){
  16.       cout<<"2 popal 1"<<endl;
  17.     }
  18.   if (x1<=x11+sh2 && x1+sh1>=x11+sh2 && y1<=y11 && y1+v1>=y11){
  19.       cout<<"2 popal 2"<<endl;
  20.     }
  21.   if (x1<=x11+sh2 && x1+sh1>=x11+sh2 && y1<=y11+v2 && y1+v1>=y11+v2){
  22.       cout<<"2 popal 3"<<endl;
  23.     }
  24.   if (x1<=x11 && x1+sh1>=x11 && y1<=y11+v2 && y1+v1>=y11+v2){
  25.       cout<<"2 popal 4"<<endl;
  26.     }
  27.  
  28.   if (x11<=x1 && x11+sh2>=x1 && y11<=y1 && y11+v2>=y1){
  29.       cout<<"1 popal 1"<<endl;
  30.     }
  31.   if (x11<=x1+sh1 && x11+sh2>=x1+sh1 && y11<=y1 && y11+v2>=y1){
  32.       cout<<"1 popal 2"<<endl;
  33.     }
  34.   if (x11<=x1+sh1 && x11+sh2>=x1+sh1 && y11<=y1+v1 && y11+v2>=y1+v1){
  35.       cout<<"1 popal 3"<<endl;
  36.     }
  37.   if (x11<=x1 && x11+sh2>=x1 && y11<=y1+v1 && y11+v2>=y1+v1){
  38.       cout<<"1 popal 4"<<endl;
  39.     }
  40.  
  41. }
Add Comment
Please, Sign In to add comment