//poj:2975 #include<stdio.h> #include<string.h> void decipher(char message[]); int main() { char message[201]; gets(message); while(strcmp(message,"START")==0) { decipher(message); printf("%s ",message); gets(message); } return 0; } void decipher(char msg[]) { char plain[]="VWXYZABCDEFGHIJKLMNOPQRSTU"; char cipherEnd[201]; int i,cipherLen; gets(msg); cipherLen=strlen(msg); for(i=0;i<cipherLen;i++) { if(msg[i]>='A'&&msg[i]<='Z') msg[i]=plain[msg[i]-'A']; } gets(cipherEnd); return; }