Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void kv(int x,int y,int sh,int v,int x1,int y1){
- for (int i=25;i>=0;i--){
- cout<<endl;
- for (int j=0;j<25;j++){
- 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 ){
- cout<<"@ ";
- }
- 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 ) {
- cout<<"# ";
- }
- else {
- cout<<" ";
- }
- }
- }
- 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){
- cout<<endl<<"great"<<endl;
- }
- else{
- cout<<"bad";
- }
- }
- int main()
- {
- int x,x1,y,y1,sh,v;
- x=0;
- y=0;
- x1=3;
- y1=3;
- sh=10;
- v=10;
- kv(x,y,sh,v,x1,y1);
- }
Add Comment
Please, Sign In to add comment