#include <stdio.h>
int main(int argc,char *argv[])
{
char ch;
printf("please input a char:");
ch = getchar();
// if((ch >=65 && ch<= 90) | (ch >=97 && ch<= 122 ))
if((ch >='A' && ch<= 'Z') | (ch >='a' && ch<= 'z' )) //两种判断方式都可以,这种方式可读性好
printf("%d\n",ch);
// else if(ch >= 48 && ch <= 57 )
else if(ch >= '0' && ch <= '9')
printf("%c\n",ch);
else
printf("输入错误\n");
return 0;
}