问题描述:判断字符所属的类型大写字母为capital letters,小写字母为small letters,数字为figures,其他字符为others。
#include<stdio.h>
int main()
{
char ch;
ch = getchar();
if (ch >= '0' && ch <= '9')
{
printf("figures");
}
else if (ch >= 'a' && ch <= 'z')
{
printf("small letters");
}
else if (ch >= 'A' && ch <= 'Z')
{
printf("capital letters");
}
else
printf("others");
return 0;
}