#includeint 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;}
本文共 292 字,大约阅读时间需要 1 分钟。
#includeint 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;}
转载于:https://www.cnblogs.com/huangsilinlana/p/3352543.html