1.程序代码
#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <windows.h>
#include <stdlib.h>
int main()
{
char ch = 0;
printf("请输入一个字符:");
scanf("%c", &ch);
if (ch >= 'A' && ch <= 'Z')
ch = ch + 32;
else if (ch >= 'a' && ch <= 'z')
ch = ch - 32;
else
return 0;
printf("%c\n", ch);
system("pause");
return 0;
}
2.执行结果