(pojstep1.1.1)poj 1298(直叙式模拟)
/* * 1298_1.cpp * * Created on: 2013年10月5日 * Author: Administrator */#include <iostream>#include <string>using namespace std;int main(){string str;while(cin >> str){cin.ignore(INT_MAX,'\n');if(str == "ENDOFINPUT"){break;}getline(cin,str,'\n');int i;for(i = 0 ; i < str.length() ; ++i){if(isalpha(str[i])){str[i] = 'A' + (str[i] - 'A' + 21) % 26;}}cout << str << endl;cin >>str;}}