题解 | #大小写转换#
大小写转换
https://www.nowcoder.com/practice/4e089ee8966a4ed4b306f64e68d45264
#include <stdio.h> int main() { char ch = 0; while ((ch = getchar()) != EOF) { getchar(); if ((ch >= 'A') && (ch <= 'Z')) { putchar(ch + 32); } else if ((ch >= 'a') && (ch <= 'z')) { putchar(ch - 32); } printf("\n"); } return 0; }