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

试试把80改成800,可能会好

Posted by frkstyc at 2005-05-17 21:42:02 on Problem 2141
In Reply To:求牛人帮忙看一下我的程序,到底哪里出问题了 Posted by:00448144 at 2005-05-17 21:18:03
> #include<iostream.h>
> void main()
> {
>     char a[26],b[80];
>     cin>>a;
> 	cin.ignore();
>     cin.getline(b,80);
> 	for(int i=0;b[i]!='\0';i++)
> 	{
> 		if(b[i]>='A'&&b[i]<='Z')
> 			cout<<char(a[b[0]-'A']-32);
> 		else if(b[i]>='a'&&b[i]<='z')
> 			cout<<a[b[i]-'a'];
> 		else if(b[i]==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