#include #include #include using namespace std; int main(int argc, char *argv[]) { int x=0; int y=0; char ch; ch=getch(); while(ch!='n'|| ch!='N') { switch(ch) { case'a': case'A' : x--; break; case'w': case'W':y--; break; case'd': case'D':x++; break; case' ':cout<<"*"; break; case's': case'S':y++; break; } gotoxy(x,y); ch=getch(); } system("PAUSE"); return EXIT_SUCCESS; }