kilolilo

double

Feb 6th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.92 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void kv(int x,int y,int sh,int v,int x1,int y1){
  6.     for (int i=25;i>=0;i--){
  7.         cout<<endl;
  8.         for (int j=0;j<25;j++){
  9.             if (i==y1+v && j>=x1 && j<=x1+sh || i==y1 && j>=x1 && j<=x1+sh || j==x1 && i>=y1 && i<=y1+v || j==x1+sh && i>=y1 && i<=y1+v ){
  10.                 cout<<"@ ";
  11.             }
  12.             else if(i==y+v && j>=x && j<=x+sh || i==y && j>=x && j<=x+sh || j==x && i>=y && i<=y+v || j==x+sh && i>=y && i<=y+v ) {
  13.                 cout<<"# ";
  14.             }
  15.             else {
  16.                 cout<<"  ";
  17.             }
  18.         }
  19.     }
  20.     if (x1>=x && x1<=x+sh || x1+sh>=x && x1+sh<=x+sh || y1>=y && y1<=y+v || y1+v>=y && y1+v<=y+v){
  21.         cout<<endl<<"great"<<endl;
  22.     }
  23.     else{
  24.         cout<<"bad";
  25.     }
  26. }
  27.  
  28. int main()
  29. {
  30.     int x,x1,y,y1,sh,v;
  31.     x=0;
  32.     y=0;
  33.  
  34.     x1=3;
  35.     y1=3;
  36.  
  37.     sh=10;
  38.     v=10;
  39.     kv(x,y,sh,v,x1,y1);
  40. }
Add Comment
Please, Sign In to add comment