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 |
cin.ignore()你有写嘛#include <iostream> #include<fstream> #include<string> using namespace std; int main (int argc,char **argv) { /* fstream cin(argv[1]);*/ string mima; string symbol; string end; int strlen; int i; while(cin>>symbol) { if (symbol.compare("ENDOFINPUT")==0) break; cin.ignore(); getline(cin,mima); /* cout<<mima<<" ***"<<endl;*/ cin>>end; strlen=mima.length(); for(i=0; i < strlen; i++) { if((mima[i]>='A')&&(mima[i]<='Z')) mima[i]='Z'-('Z'-mima[i]+5)%26; } cout<<mima<<endl; } /* cin.close;*/ return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator