| ||||||||||
| 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 | |||||||||
测试过没错,为这么会RE了呢。。。。大家帮下忙~#include<iostream>
using namespace std;
int main()
{
char ch,chs[20];
while(true){
int i=0;
while(true){
ch=getchar();
if(ch=='\n')
break;
else{
chs[i]=ch;
i++;
}
}
if(chs[0]=='E' && chs[1]=='N' && chs[2]=='D' && chs[3]=='O' && chs[4]=='F' && chs[5]=='I' && chs[6]=='N' && chs[7]=='P' && chs[8]=='U' && chs[9]=='T')
break;
while(true){
ch=getchar();
if(ch=='\n'){
cout<<endl;
break;
}
if(ch>='F' && ch<='Z')
cout<<(char)(ch-5);
else if(ch>='A' && ch<='E')
cout<<(char)(ch+21);
else cout<<ch;
}
while(true){
ch=getchar();
if(ch=='\n')
break;
}
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator