Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main(){
- float x1,y1,sh1,v1,x11,y11,sh2,v2;
- x1=0;
- y1=0;
- sh1=4;
- v1=3;
- x11=1.5;
- y11=-2;
- sh2=4.5;
- v2=6.5;
- if (x1<=x11 && x1+sh1>=x11 && y1<=y11 && y1+v1>=y11){
- cout<<"2 popal 1"<<endl;
- }
- if (x1<=x11+sh2 && x1+sh1>=x11+sh2 && y1<=y11 && y1+v1>=y11){
- cout<<"2 popal 2"<<endl;
- }
- if (x1<=x11+sh2 && x1+sh1>=x11+sh2 && y1<=y11+v2 && y1+v1>=y11+v2){
- cout<<"2 popal 3"<<endl;
- }
- if (x1<=x11 && x1+sh1>=x11 && y1<=y11+v2 && y1+v1>=y11+v2){
- cout<<"2 popal 4"<<endl;
- }
- if (x11<=x1 && x11+sh2>=x1 && y11<=y1 && y11+v2>=y1){
- cout<<"1 popal 1"<<endl;
- }
- if (x11<=x1+sh1 && x11+sh2>=x1+sh1 && y11<=y1 && y11+v2>=y1){
- cout<<"1 popal 2"<<endl;
- }
- if (x11<=x1+sh1 && x11+sh2>=x1+sh1 && y11<=y1+v1 && y11+v2>=y1+v1){
- cout<<"1 popal 3"<<endl;
- }
- if (x11<=x1 && x11+sh2>=x1 && y11<=y1+v1 && y11+v2>=y1+v1){
- cout<<"1 popal 4"<<endl;
- }
- }
Add Comment
Please, Sign In to add comment