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 |
气人run time erro为什么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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator