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:哪里错了啊?????????????

Posted by lolohot at 2009-03-14 14:41:05 on Problem 3507
In Reply To:哪里错了啊????????????? Posted by:yanzhu at 2009-03-12 17:06:38
> #include<iostream>
> using namespace std;
> int main()
> {
>   float a[6],t,m;
> 	
>   for(int x=0;x<6;x++)
> 	  cin>>a[x];
> 	while(a[0]!=0&&a[1]!=0&&a[2]!=0&&a[3]!=0&&a[4]!=0&&a[5]!=0)
> 	{
>        for(int i=0;i<5;i++)
> 		   for(int j=0;j<5-i;j++)
> 			   if(a[j]>a[j+1])
> 			   {
> 				   t=a[j];
> 				   a[j]=a[j+1];
> 				   a[j+1]=t;
> 			   }
> 			   m=0;
> 			   for(int y=1;y<5;y++)
> 				   m+=a[y];
> 			   cout<<m/4<<endl<<endl;
> 			   for(int x=0;x<6;x++)
> 	                 cin>>a[x];
> 	}
> 	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