如果是小写字符就输出对应的大写字符,
如果接收的是大写字符,就输出对应的小写字符,
如果是数字不输出。
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main()
{
char input = 0,output;
printf("请输入字母:");
while ((input = getchar()) != EOF)
{
if (input >= 'a' && input <= 'z')
{
printf("output =%c", input - 32);
}
if (input >= 'A' && input <= 'Z')
{
printf("output =%c", input + 32);
}
if (input >= '0'&& input <= '9')
{
continue;
}
}
printf("\n");
system("pause");
return 0;
}