代码
#include <stdio.h>
int main()
{
int j;
char ch[80];
gets(ch);
j = 0;
while(ch[j] != '\0')
{
if(((ch[j] >= 'A') && (ch[j] <= 'Z')) || ((ch[j] >= 'a') && (ch[j] <= 'z')))
{
if(((ch[j] >= 'W') && (ch[j] <= 'Z')) || ((ch[j] >= 'w') && (ch[j] <= 'z')))
{
ch[j] = ch[j] - 22;
}
else
ch[j] = ch[j] + 4;
}
else if((ch[j] >= '0') && (ch[j] <= '9'))
{
ch[j] = '9' - ch[j] + '0';
}
else
{
ch[j] = ch[j];
}
j++;
}
puts(ch);
return 0;
}