题解 | #字母大小写转换#
字母大小写转换
http://www.nowcoder.com/practice/850ebd30a2a34cfc87199da3fc15786a
include<stdio.h>
int main()
{
char ch=0;
while(~scanf("%c",&ch))
{
getchar();
//if(ch<='z'&&ch>='a'||ch<='Z'&&ch>='A')
//{
if(ch<='z'&&ch>='a')//(格式错误的原因是未吸收)
{
printf("%c\n",ch-32);
}
else if(ch<='Z'&&ch>='A')
{
printf("%c\n",ch+32);
}//printf("\n");
//}
//else
//continue;
}
return 0;
}