#include<conio.h>
void main() { char c;
while ( 1 ) {
c=getch();
if ( c==27 ) { printf("Esc鍵退出。\n"); break; }
else if ( c>='a' && c<='z' ) printf("小寫字母\n");
else if ( c>='A' && c<='Z' ) printf("大寫字母\n");
else if ( c>='0' && c<='9' ) printf("數字\n");
else printf("其他字符\n");
}
}