#include<stdio.h>
int main()
{
char s[100];
printf("请输入字符串:\n");
gets(s);
fun(s);
printf("转换后字符串:\n%s\n",s);
return 0;
}
int fun(char s[])
{
int i;
for(i=0;s[i]!=0;i++)
if(s[i]>='a'&&s[i]<='z')
s[i]=s[i]-32;
else
if(s[i]>='A'&&s[i]<='Z')
s[i]=s[i]+32;
}