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

为什么不输出结果呀????

Posted by 00430030 at 2004-12-30 12:16:38 on Problem 2141
#include<stdio.h>
#include<math.h>
void main () 
{
	char  a[26],b[200];
    int i,j,p,l,c[200];
	for(i=0;i<26;i++)
		scanf("%c",&a[i]);
	    scanf("\n");
    for(j=0;;j++)
{		scanf("%c",&b[j]);
	    if(scanf("%c",&b[j])=='\n')  {p=j;   goto end;}
}
end:	for(l=0;l<p;l++)
        c[l]=b[l]-'a';
    	for(l=0;l<p;l++)
		printf("%c",a[c[l]]);
}

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