标签:int std mil \n mic ros i++ stdio.h 大奖赛
#include<stdio.h>
int main(){
int a[100],n,i,max=a[0],min=a[0];
float sum,ave;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",a[i]);
sum+=a[i];
}
for(i=1;i<n;i++){
if(min>a[i])min=a[i];
if(max<a[i])max=a[i];
}
ave=(sum-min-max)*1.0/(n-2);
printf("%.2f\n",ave);
return 0;
}
标签:int std mil \n mic ros i++ stdio.h 大奖赛
原文地址:https://www.cnblogs.com/huoyuying/p/9735694.html