Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:哪里错了啊?????????????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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator