#include
#include
int main (void)
{
char ch[100];
int a = 0;
gets (ch);
while (ch[a] != '\0')
{
if (isupper (ch[a]))
ch[a] = tolower (ch[a]);
else if (islower (ch[a]))
ch[a] = toupper (ch[a]);
else
ch[a] += 1;
a++;
}
puts (ch);
return 0;
}
已测试,运行正常。