第1个回答 2013-12-11
#include <stdio.h>
void main()
{ char c;
printf("Enter a character:");
c=getchar();
if(c<0x20) printf("The character is a control character\n");
else if(c>='0'&&c<='9') printf("The character is a figure\n");
else if(c>='A'&&c<='Z') printf("The character is a capital letter\n");
else if(c>='a'&&c<='z') printf("The character is a small letter\n");
else printf("The character is other character\n");
}本回答被网友采纳
第2个回答 推荐于2016-04-12
如果你输入一个数字:12 从字面看来是一个int型,但也可以是一个float型。
关键是要指定:
int a;
scanf("%d",&a);
float b;
scanf("%f",&b);
第3个回答 2013-12-11
你要通过ACSII码来判断.C语言的附录上面有ASCII码的对应值的,我没有表.所以不好写.