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:为什么总是Runtime Error啊!!谁能说明一下

Posted by qiuzihao at 2015-07-22 10:31:04 on Problem 3507
In Reply To:为什么总是Runtime Error啊!!谁能说明一下 Posted by:rcrt10 at 2009-06-19 23:44:04
> #include<iostream>
> using namespace std;
> int main()
> {
> 	int x[100][6];
> 	int n=0;
> 	int a,b,c,d,e,f;
> 	cin>>a>>b>>c>>d>>e>>f;
> 	while(!((a==0)&&(b==0)&&(c==0)&&(d==0)&&(e==0)&&(f==0)))
> 	{
> 		x[n][0]=a;
> 		x[n][1]=b;
> 		x[n][2]=c;
> 		x[n][3]=d;
> 		x[n][4]=e;
> 		x[n][5]=f;
> 		cin>>a>>b>>c>>d>>e>>f;
> 		n++;
> 	}
> 	int i;
> 	int j=0,l=0;
> 	int m;
> 	for(i=0;i<n;i++)
> 	{
> 		for(m=1;m<6;m++)
> 		{
> 	    	if(x[i][m]<x[i][j])
> 				j=m;
> 		}
> 		for(m=1;m<6;m++)
> 		{
> 	    	if(x[i][l]>x[i][l])
> 				l=m;
> 		}
> 		cout<<(x[i][0]+x[i][1]+x[i][2]+x[i][3]+x[i][4]+x[i][5]-x[i][j]-x[i][l])/4.0<<endl;
> 	}
> 	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