提交时间:2019-11-24 21:13:12
运行 ID: 2422
#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=float(sum-max-min)/(n-2); printf("%.1f",average); return 0; }