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

Re:哪位大哥帮帮忙,为什么一直wa

Posted by cpp050800448144 at 2005-04-23 22:36:18 on Problem 2141
In Reply To:哪位大哥帮帮忙,为什么一直wa Posted by:00448144 at 2005-04-23 17:35:04
> #include<iostream.h>
> void main()
> {
> 	char array[27];
> 	char array1[1000];
> 	cin>>array;
> 	cin.ignore();
> 	cin.getline(array1,1000);
> 	cout<<char(array[array1[0]-'A']-32);
> 	for(int i=1;array1[i]!='\0';i++)
> 	{
> 		if(array1[i]<='z'&&array1[i]>='a')
>     	   cout<<array[array1[i]-'a'];
> 		else if(array1[i]==char(32))
> 			cout<<" ";
> 	}
> 	cout<<endl;
> }

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