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 y05dzz at 2006-03-29 17:28:53 on Problem 2141
#include<iomanip.h>
#include<string.h>
int main()
{
	char a[26],ch;
	cin>>a;
	/*	cin.get(ch);
	cin.get(ch);
	if(ch>='a'&&ch<='z')
	{
	cout<<a[ch-'a'];
	}
	else
	{
	cout<<ch;
}*/
	while(cin.get(ch))
	{
		if(ch>='A'&&ch<='Z')
		{
			char cha=a[ch-'A']-32;
			cout<<cha;
		}
		if(ch>='a'&&ch<='z')
		{
			cout<<a[ch-'a'];
		}
		else
			if(!(ch>='a'&&ch<='z')&&!(ch>='A'&&ch<='Z'))
			{
				cout<<ch;
			}
	}
	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