提交时间:2019-11-24 21:14:00

运行 ID: 2423

#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("%.1f",average); return 0; }