| ||||||||||
| 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 | |||||||||
希望有热心人帮忙看一下,呜呜、、不知道为什么一直 wrong~ 提前说:谢谢了!#include <iostream>
#include <cstdio>
#include <string>
using namespace std;
int main()
{
char a[26],o[100];
int l,i;
cin>>a;
gets(o);
l=strlen(o);
for(i=0;i<l;i++)
{
if(o[i]>='A'&&o[i]<='Z') cout<<(char)(a[(int)(o[i]-'A')]-32);
else if(o[i]>='a'&&o[i]<='z') cout<<a[(int)(o[i]-'a')];
else cout<<o[i];
}
cout<<endl;
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator