| ||||||||||
| 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 | |||||||||
改了一个小错误就VCO(∩_∩)O~#include<iostream>//用cin的话,空格之后的将不再读入,故改用gets();
#include<string>
using namespace std;
int main()
{
int i;
char a[200];
char b[20];
char c[10];
gets(b);
while(strcmp(b,"ENDOFINPUT")!=0)
{
gets(a);
gets(c);
for(i=0;i<200;i++)
{
if(a[i]>='A'&&a[i]<='E')cout<<char(a[i]+26-5);
else if(a[i]>'E'&&a[i]<='Z')cout<<char(a[i]-5);
else if(a[i]=='\0')break;
else cout<<char(a[i]);
}
cout<<endl;
gets(b);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator