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 |
为何总是runtime error#include<iostream> #include<cstdio> using namespace std; int main(){ int a[6]={0}; int sum,max,min,i; while(scanf("%d %d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4],&a[5])){ if(a[0]==0&&a[1]==0&&a[2]==0&&a[3]==0&&a[4]==0&&a[5]==0) break; sum=0; max=-99999999,min=99999999; for(i=0;i<6;i++){ sum+=a[i]; if(max<a[i]) max=a[i]; if(min>a[i]) min=a[i]; } printf("%g\n",(sum-max-min)/4.0); } } 交了多次总是runtime error Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator