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

555555555555555!!!!!!!!!!!!

Posted by ecjtuwh at 2006-08-09 11:13:41 on Problem 2141
#include<stdio.h>
#include<string.h>
int main()
{
 int i,j,k,l,m,n,len,d[100];
 char a[30],b[100],c[100];
 gets(a);gets(b);
 len=strlen(b);
 for(i=0;i<=len;i++)
    {
        if(b[i]==' ')d[i]=' ';
        else if(b[i]>='A'&&b[i]<='Z') d[i]=b[i]-65;
        else  d[i]=b[i]-97;
           //printf("%d ",d[i]);
    }
 
 for(i=0;i<=len;i++)
   {
    if(b[i]==' ') c[i]=' '; 
    else c[i]=a[d[i]];
   } 
 printf("%c",c[0]-32);  
 for(i=1;i<len;i++)
   printf("%c",c[i]);
 //printf("\n");
 
}    


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