#include <conio.h> #include <stdio.h> int main() { int key=0; while(key=getch()) { //printf("%c",key); switch(key) { case 'a':printf("left ");break; case 's':printf("down ");break; case 'd':printf("right ");break; case 'w':printf("up ");break; } } }
时间: 2024-10-11 05:59:17