| ||||||||||
| 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 | |||||||||
此题真是简单过。一次ac。贴代码:#include"stdio.h"
#include"string.h"
int main()
{
char a[30],map[200],char b[90];
int i,j,k;
scanf("%s",&a);
getchar();
gets(b);
i='a';
for(j=0;j<strlen(a);j++)
map[i++]=a[j];
for(i=0;i<strlen(b);i++)
if(b[i]>='A'&&b[i]<='Z')
printf("%c",map[b[i]+32]-32);
else if(b[i]>='a'&&b[i]<='z')
printf("%c",map[b[i]]);
else
printf("%c",b[i]);
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator