Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
1298为什么wrong answer???求高手指导#include <iostream> #include <string> using namespace std; void jiemi(string s) { for(int i=0;i<=s.size();i++) { if('A'<=s[i]&&s[i]<='E') cout<<char(s[i]+21); else if('F'<=s[i]&&s[i]<='Z') cout<<char(s[i]-5); else cout<<s[i]; } } int main() { string str; while(cin>>str) { if(str=="ENDOFINPUT") break; if(str=="START") { char enter=cin.get(); getline(cin,str); jiemi(str); } } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator