| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
555555555555555!!!!!!!!!!!!#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator