提交显示wrong answer 怎么改题的答案求求了好心人

循环结构习题:大小写字母转换

Time Limit:5000MS Memory Limit:65536K
Total Submit:9059 Accepted:5031

Description

将输入字符序列ABCdef变换,大写转换为小写,小写转换为大写输出。

Input

输入仅一行,输入字符序列

Output

输出仅一行,字符转换。大写变小写,小写变大写,其它字符不变

Sample Input

ABC&d#ef
Sample Output

abc&D#EF
Source

代码:
#include<stdio.h>
int main()
{
char a;
while(scanf("%c",&a)!=EOF)
if(a>'A'&&a<'Z')
printf("%c",a+32);
else if(a>'a'&&a<'z')
printf("%c",a-32);
else
printf("%c",a);
return 0;
}

if (a >= 'A' && a <= 'Z')
.....
else if (a >= 'a' && a <= 'z')
.....