数字字符和其他字符一样呀。'0'-48,'1'-49...字符-对应ASCLL值。只要是字符用'表示就可以了
可以找相对应的ascll码
数字也是有ASCII码的,0-9的ASCII码为48到57
#include <stdio.h>
int main()
{
char c;
scanf("%c", &c);
if (c >= '0' && c <= '9')
{
printf("digit");
}
else if (c >= 'a' && c <= 'z')
{
printf("lower");
}
else
{
printf("other");
}
return 0;
}