6-5

#include<stdio.h>
int main(void)
{
    char ch;
    printf("input characters:");
    ch=getchar();
    while(ch!='\n'){
        if(ch>='A'&&ch<='Z')
            ch=ch-'A'+'a';
        else if(ch>='a'&&ch<='z')
            ch=ch-'a'+'A';
        putchar(ch);
        ch=getchar();
    }
    return 0;
}

posted @ 2013-10-08 00:17  傻子疯子捏子  阅读(92)  评论(0编辑  收藏  举报