#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;}
本文共 350 字,大约阅读时间需要 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/xuqiongxiang/p/3352846.html