I

I

Description

X现在要学习英文以及各种稀奇古怪的字符的了。现在他想把一串字符中的小写字母变成大写字符,大写字母变成小写字母,其他的保持不变。

Input

 输入有多组。

每组输入一个字符串,长度不大于80,不包含空格。

Output

 输出转换后的字符串

Sample

Input 

A*
B+

Output 

a*
b+

Hint

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>int main(){char s[81];int l, i;while(gets(s) != NULL){l = strlen(s);for(i = 0; i < l; i++){if(s[i] >= 'a' && s[i] <= 'z'){s[i] = s[i] - 32;}else if(s[i] >= 'A' && s[i] <= 'Z'){s[i] = s[i] + 32;}}printf("%s\n", s);}return 0;
}

发布者:admin,转转请注明出处:http://www.yc00.com/news/1690913319a461862.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信