首页 > 其他 > 详细

<swustoj>?id=563 String

时间:2016-07-31 22:10:09      阅读:195      评论:0      收藏:0      [点我收藏+]

链接http://acm.swust.edu.cn/problem/563/

#include <stdio.h> 
#include <string.h>
int main()
{
    char str[105];
    while(scanf("%s",str)!=EOF)
    {
        int leng = strlen(str),i;
        for(i = 0 ; i< leng ; i ++)
        {
        if(str[i]>=a&&str[i]<=z)
        {
            str[i]=str[i]-32;
        }
        else if(str[i]>=A&&str[i]<=Z)
        {
            str[i]=str[i]+32;
              
        }
        }
        printf("%s\n",str);
    }
    return 0;
}

 

<swustoj>?id=563 String

原文:http://www.cnblogs.com/niconiconi/p/5724012.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!