#include <stdio.h>
int main(int argc, char * argv[])
{
int i = 1;
while(i){
char n;//w = 1,s = 2,a = 3,d = 4;
scanf("%c",&n);
switch(n){
case 'w':printf("上\n");break;
case 's':printf("下\n");break;
case 'a':printf("左\n");break;
case 'd':printf("右\n");break;
case 'q':i = 0;
default:break;
}
}
getchar();
return 0;
} |
|