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

气人run time erro

Posted by RUNSLOWLY at 2008-05-07 19:55:48 on Problem 3325
为什么run time erro
#include<stdio.h>
void main()
{
	int sum[30],*min,*max,score[20],n,i,j=0;
	scanf("%d",&n);
	while(n!=0)
	{
		min=score;
    	max=score;
		sum[j]=0;
		for(i=0;i<n;i++)
		{
			scanf("%d",&score[i]);
			sum[j]+=score[i];
			if(score[i]>*max)
				max=score+i;
			else
				if(score[i]<*min)
					min=score+i;
		}
		sum[j]=(sum[j]-*min-*max)/(n-2);
		j++;
		scanf("%d",&n);
	}
	for(i=0;i<j;i++)
	printf("%d\n",sum[i]);
	
}

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