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

OLE。。。搞不懂,会的朋友进来帮忙看看吧,感激不尽。。。

Posted by Agan at 2006-09-12 22:56:39 on Problem 1298
#include"stdio.h"
#include"math.h"
#include"string.h"
main()
{
	char a[202];
	int i;
	while(1)
	{	
		scanf("%[^\n]",a);//输入START或ENDOFINPUT
		fflush(stdin);
		if(strcmp(a,"ENDOFINPUT")==0)
			return(1);
		scanf("%[^\n]",a);//输入Cipher message
		fflush(stdin);
		for(i=0;i<strlen(a);i++)
		{
			if(a[i]>='A'&&a[i]<='E')
				a[i]=a[i]+21;
			else
				if(a[i]>'E'&&a[i]<='Z')
					a[i]=a[i]-5;
		}
     	printf("%s\n",a);
		scanf("%[^\n]",a);//输入END
		fflush(stdin);
	}
}
		

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