Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

改了一个小错误就VCO(∩_∩)O~

Posted by flytomylife1 at 2009-04-07 22:08:16 on Problem 1298
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator