.编写一个程序,可以一直接收键盘字符,
如果是小写字符就输出对应的大写字符,
如果接收的是大写字符,就输出对应的小写字符,
如果是数字不输出。
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
void conversion() {
char input, output;
while (1) {
scanf("%c", &input);
//input = getchar(); 两种输入方法均可
printf("\n");
if (input <= 90 && input >= 65) {
output = input + 32;
printf("变换后:%c\n", output);
}
if (input <= 122 && input >= 97) {
output = input - 32;
printf("变换后:%c\n", output);
}
}
}
int main() {
conversion();
system("pause");
return 0;
}