使用getchar()和putchar()从键盘输入字符并以相反的方式显示它们

#include <stdio.h>
#include <ctype.h>

int main(void)

{
   char ch;
   printf(Enter some text (type a period to quit).\n);
   do {
      ch = getchar();
      if (islower(ch)) ch = toupper(ch);
      else ch = tolower(ch);
      putchar(ch);
   } while (ch != '.');
   return 0;
}

相关文章

for遍历数组
。。。
声明一个计数循环
咕咕咕
#include <stdio.h> int main (void) { printf (&quo...