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

高手救我!!!!!!!!!!!!

Posted by 00400000 at 2005-06-03 20:36:36 on Problem 1298
#include<iostream>
#include<string>
using namespace std;
void main()
{
	string S1("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),S2("VWXYZABCDEFGHIJKLMNOPQRSTU");
	string s1,s2,s3,s4("ENDOFINPUT");
	int i,j;
	while(1)
	{
		cin>>s1;
		if(s1.compare(s4)==0)
			break;
		getline(cin,s3);
		cout<<s3;
		for(i=0;i<s3.size();i++)
		{
			if(s3[i]<='Z'&&s3[i]>='A')
			{
				j=S1.find(s3[i]);
				s3[i]=S2[j];
			}
		}
		cout<<s3<<endl;
		cin>>s2;
	}
}


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