题解 | #字母大小写转换#
字母大小写转换
http://www.nowcoder.com/practice/850ebd30a2a34cfc87199da3fc15786a
#include <stdio.h>
#include <ctype.h>
int main()
{
char ch = 0;
//多组输入
while (~scanf(" %c", &ch))
{
//isupper - islower - 判断是大小写字母
if (islower(ch))
{
//tolower - toupper - 转换为大小写字母
printf("%c\n", toupper(ch));
}
else if (isupper)
{
printf("%c\n", tolower(ch));
}
}
return 0;
}编程初学者入门训练 文章被收录于专栏
针对编程初学者入门训练130题的代码详解专栏,内附注释方便理解,牛客130题的代码均用C语言实现,方便初学者学习。

