这里是代码
#include<stdio.h>
int main(void){
int n, min, max;
int sum = 0;
scanf("%d",&n);
int score[n];
int i = 0;
for(i = 0; i < n; i ++){
scanf("%d",& score[i]);
}
max = min = score[0];
for(i = 0; i < n; i ++){
if(max < score[i]){
max = score[i];
}
if(min > score[i]){
min = score[i];
}
sum += score[i];
}
// printf("%d %d %d\n",sum, max, min);
printf("%.2f", (sum - max - min)/(n - 2));
return 0;
}
前面的几个值都是正确的,但是输出一直是0.00 泪了