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 |
我无语了!#include <stdio.h> #include <string.h> int main() { char hash[30]; char str[100]; int i,length; scanf("%s",hash); getchar(); gets(str); length=strlen(str); for(i=0;i<length;i++) { if(str[i]>='A'&&str[i]<='Z') { str[i]+=32; printf("%c",hash[str[i]-'a']-32); } else if(str[i]>='a'&&str[i]<='z') { str[i]=hash[str[i]-'a']; printf("%c",str[i]); } else printf("%c",str[i]); } printf("\n"); return 1; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator