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 qiangBren at 2008-07-04 10:55:46 on Problem 1298
In Reply To:好奇怪!我觉得我的代码没错为什么总AC不了?? Posted by:shuiye at 2007-08-24 10:23:52
>  #include<stdio.h>
> #include<string.h>
> int main()
> {    char s[200];
>      int i,j;
>    while(scanf("%s",s)!=EOF)
>      {
>        if(strcmp(s,"START")==0||strcmp(s,"END")==0)
>           continue;
>        if(strcmp(s,"ENDOFINPUT")==0)
>            break;
>             for(i=0;i<strlen(s);i++)
>                 {
>                      if(s[i]>='A'&&s[i]<='E')
>                        {
>                         s[i]=s[i]+21;
> 
>                         }
>                      if(s[i]>'E'&&s[i]<='Z')
>                       {
>                        s[i]=s[i]-5;
> 
>                        }
>                  }
>              printf("%s\n",s);
> 
> 
>      }
> 
>   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