...直接找下对应关系..
#include <cstdio>
#include <cstring>
using namespace std;
int main(){
char line[105];
while(gets(line)){
if(strcmp(line,"START")==0||strcmp(line,"END")==0)continue;
if(strcmp(line,"ENDOFINPUT")==0)break;
int len=strlen(line);
for(int i=0;i<len;i++){
if(line[i]>='A'&&line[i]<='E'){
line[i]=line[i]+21;
}else if(line[i]>='F'&&line[i]<='Z'){
line[i]=line[i]-5;
}
}
puts(line);
}
return 0;
}