Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

希望有热心人帮忙看一下,呜呜、、不知道为什么一直 wrong~ 提前说:谢谢了!

Posted by SWUST_smiles at 2010-08-07 20:39:47 on Problem 2141
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator