1-1字符判断
#include<stdio.h>
int main()
{
char c;
scanf("%c",&
c);
if(c>=
'a'&&c<=
'z')
{
c=c-
32;
printf("%c\n",c);
}
else if(c>=
'A'&&c<=
'Z')
{
c=c+
32;
printf("%c\n",c);
}
else if(c>=
0&&c<=
9)
{
c=
c;
printf("%c\n",c);
}
else if(c==
' ')
{
printf("space\n");
}
else
{
printf("other\n");
}
return 0;
}
转载于:https://www.cnblogs.com/mlj527/p/5989055.html
转载请注明原文地址: https://mac.8miu.com/read-37625.html