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:哪位大侠帮忙看一下程序为什么无法通过啊 谢谢了

Posted by FJJ314 at 2009-05-27 16:12:35 on Problem 3650
In Reply To:哪位大侠帮忙看一下程序为什么无法通过啊 谢谢了 Posted by:huohaifeng at 2009-03-19 22:46:58
> #include<stdio.h>
> #include<string.h>
> void main()
> {
>     while(1)
>     {
>         char a[80],*p;
>         gets(a);
>         if(strcmp(a,"#")!=0)
>         {
>             p=a;
>             while(*p!='\0') 
> 			{
>                 if(*p==' ')   printf("%%20");
>                 else if(*p=='!')  printf("%%21");
>                 else if(*p=='$')  printf("%%24");
>                 else if(*p=='%')  printf("%%25");
>                 else if(*p=='(')  printf("%%28");
>                 else if(*p==')')  printf("%%29");
>                 else if(*p=='*')  printf("%%2a");
>                 else printf("%c",*p);
>                 p++;
>             }
>         }
>         else break;
>     }
> }

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