提交时间:2019-11-24 21:15:36
运行 ID: 2424
#include<iostream> using namespace std; int main(){ int a[20000],n,score,max=0,min=100; float average,sum; cin>>n; for(int i=1;i<=n;i++){ cin>>a[score]; sum+=a[score]; if(a[score]>max) max=a[score]; if(a[score]<min) min=a[score]; } average=(sum-max-min)/(n-2); printf("%f",average); return 0; }