题解 | #字母大小写转换#
字母大小写转换
http://www.nowcoder.com/practice/850ebd30a2a34cfc87199da3fc15786a
#include<stdio.h>
#include<ctype.h>
int main()
{
char ch;
while(scanf("%c",&ch)!=EOF)
{
if(islower(ch))
printf("%c\n", toupper(ch));
else if(isupper(ch))
printf("%c\n",tolower(ch));
getchar();
}
return 0;
}
#include<ctype.h>
int main()
{
char ch;
while(scanf("%c",&ch)!=EOF)
{
if(islower(ch))
printf("%c\n", toupper(ch));
else if(isupper(ch))
printf("%c\n",tolower(ch));
getchar();
}
return 0;
}