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<iostream> #include<cstring> using namespace std; int main() { char s[27],t[100]; int i,j; gets(s); gets(t); for(i=0;t[i]!='\0';i++) { if(t[i]>='a'&&t[i]<='z') { j=t[i]-97; t[i]=s[j]; } if(t[i]>='A'&&t[i]<='Z') { j=t[i]-65; t[i]=s[j]-32; } } puts(t); system("pause"); return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator