haha1235  
#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 on 2013-10-07 11:58  haha1235  阅读(130)  评论(0编辑  收藏  举报