#include <stdio.h> #include <conio.h> #define ARR 72 #define ABJ 80 #define DER 77 #define IZQ 75 int main() { int x=1,y=1; int c; do{ clrscr(); gotoxy(x,y); printf("*"); c=getch(); switch(c) { case ARR: y-=1; if(y<1)y=1; break; case ABJ: y+=1; break; case IZQ: x-=1; if(x<1)x=1; break; case DER: x+=1; if(x>80)x=80; break; } }while(c!='0'); return 0; }