首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

(pojstep1.1.1)poj 1298(直谈式模拟)

2013-10-06 
(pojstep1.1.1)poj 1298(直叙式模拟)/* * 1298_1.cpp * *Created on: 2013年10月5日 *Author: Administrat

(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;}}

热点排行