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 09031036 at 2010-11-07 15:18:00 on Problem 1298
In Reply To:帮忙看一下哪里错了,谢拉 Posted by:hitfzyangdianshi at 2010-10-07 08:42:10
> #include<stdio.h>
> //#include<conio.h>
> #include<string.h>
> char change(char c)
> {
> 	if(c=='A')return 'V';
> 	if(c=='B')return 'W';
> 	if(c=='C')return 'X';
> 	if(c=='D')return 'Y';
> 	if(c=='E')return 'Z';
> 	if(c=='F')return 'A';
> 	if(c=='G')return 'B';
> 	if(c=='H')return 'C';
> 	if(c=='I')return 'D';
> 	if(c=='J')return 'E';
> 	if(c=='K')return 'F';
> 	if(c=='L')return 'G';
> 	if(c=='M')return 'H';
> 	if(c=='N')return 'I';
> 	if(c=='O')return 'J';
> 	if(c=='P')return 'K';
> 	if(c=='Q')return 'L';
> 	if(c=='R')return 'M';
> 	if(c=='S')return 'N';
> 	if(c=='T')return 'O';
> 	if(c=='U')return 'P';
> 	if(c=='V')return 'Q';
> 	if(c=='W')return 'R';
> 	if(c=='X')return 'S';
> 	if(c=='Y')return 'T';
> 	if(c=='Z')return 'U';
> 	return c;
> }
> main()
> {
>       char ch[200],text[10000]="";
>       while(1)
>       {
>           gets(ch);
>           if(ch=="ENDOFINPUT")goto loop;                   
>           else if(ch!="START")
>           {
>               if(ch!="END")
>               {
>                  strcat(text,ch);
>                  strcat(text," ");
>               }
>               else if(ch=="END")
>               {
>                  strcat(text,"\n");
>               }
>           }
>       }
> loop: int i;
>       for(i=0;i<strlen(text);i++)
>       {
>           printf("%c",change(text[i]));
>       }
>      // getch();
> }   

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