#include<stdio.h> #include<math.h> #include<string.h> //#include<algorithm> #include <bits/stdc++.h> int main() { char biao[]= {"ABCDEFGHIJKLMNOPQRSTUVWXYZM"}; char str[1000]; while(1) { gets(str); if(strcmp(str,"ENDOFINPUT")==0) { break; } gets(str); for(int i=0; i<strlen(str); i++) { if(str[i]<='Z' && str[i]>='A') { printf("%c",biao[(str[i]-'A'+26-5)%26]); } else { printf("%c",str[i]); } } printf("\n"); gets(str); } } /* F:\temp\22489811.23341\Main.cc:6:25: error: bits/stdc++.h: No such file or directory */ |
Double click to view unformatted code.