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 X,int Y){
- for (int i=14;i>=0;i--){
- cout<<endl;
- for (int j=0;j<14;j++){
- if (j==X && i==Y ){
- 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<<" ";
- }
- }
- }
- }
- int main()
- {
- int x,y,sh,v,X,Y;
- x=1;
- y=1;
- sh=10;
- v=10;
- cin>>X>>Y;
- if ((x<X && x+sh>X )&& (y+v>Y && y<Y) ){
- cout<<"great";
- }
- else{
- cout<<"bad";
- }
- kv(x,y,sh,v,X,Y);
- }
Add Comment
Please, Sign In to add comment