请帮忙指点是什么地方出了问题,谢谢!
#include<stdio.h>void main()
{
char c;
printf("input a character:");
c=getchar();
if(c<32)
{
printf("This is a control character\n");
}
else if(c>='0'&&c<'9')
{
printf("This is a digit\n");
}
else if(c>='A'&&c<'Z')
{
printf("This is acapital letter!\n");
}
else if (c>='a'&&c<'z')
{
printf("This is a small letter!");
}
else printf("This is another letter!");
getch();
}
为什么输入超出0-9的数字范围的时候,老是显示This is a digit,比如输入588.