#include
char main(){
int ch;
scanf("%d",&ch);
if(ch>=65&&ch<=90){
printf("%c",'大写字母');
}
else if(ch>=97&&ch<=122){
printf("%c",'小写字母');
}
else if(ch>=48&&ch<=57){
printf("%c",'数字');
}
else if(ch==0){
printf("%c",'空格');
}
else if(ch<= 65&&ch>57,ch<=97&&ch>90,ch <=48&&ch>0,ch!=0,ch>122){
printf("%c",'其他字符');
}
return 0;
}
你的格式化输出printf有问题啊,printf("%c",'大写字母');比如这个你是要输出什么,如果输出大写字母,就直接printf("大写字母"),奇怪的是你这样不报错吗
printf 的三种修改方法: