online_judge_1105

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
    char str[81];
    int i;
    while(gets(str)!=NULL)
    {
        if(strcmp(str,"!")==0)
            break;
        for(i=0;str[i]!='\0';i++)
        {
            if(str[i]>='a'&&str[i]<='z')
                str[i]='a'+'z'-str[i];
            else if(str[i]>='A'&&str[i]<='Z')
                str[i]='A'+'Z'-str[i];
        }
        puts(str);
    }
    return 0;
}

posted on 2015-01-28 16:39  赛亚人  阅读(98)  评论(0编辑  收藏  举报