输入一个字符,判断它如果是小写字母输出其对应的大写字母,如果是大写字符输出其对应的小写字母 ,如果是数字则直接输出数字,不是上述情况输出other
#include<stdio.h>
#include <iostream>
using namespace std;
int main()
{
char x;
int i=1;
do
{
scanf("%c\n",&x);
if(x>='A'&&x<='Z')
{ x=x+32;
printf("%c\n",x);}
else if(x>='a'&&x<='z')
{ x=x-32;
printf("%c\n",x);}
else if(x>='0'&&x<='9')
{printf("%c\n",x);}
else
{printf("other\n");}
i++;
}
while(i<=4);
return 0;
}