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

Re:AC 后的程序,供参考

Posted by changchunteng at 2009-04-05 16:19:35 on Problem 1298
In Reply To:AC 后的程序,供参考 Posted by:iammk at 2009-04-05 15:36:32
> #include<stdio.h>
> #include<string.h>
> void main()
> {
> 	int i,Len;
> 	char a[200]; 
>     while (1)
> 	{
> 		gets(a);
> 		Len=strlen(a);
> 		if(strcmp(a,"START")==0||strcmp(a,"END")==0);
> 		else if(strcmp(a,"ENDOFINPUT")==0)break;
> 		else
> 		{
> 			for(i=0;i<Len;i++)
> 			{
> 				if(a[i]<='Z'&&a[i]>='A')
> 				{
> 					if(a[i]<='E')
> 						a[i]=a[i]-5+26;
> 					else a[i]=a[i]-5;
> 				}
> 			}
> 			puts(a);
> 		}
> 	}
> }
不要把这么简单的题的代码贴出来好不???

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