zhanghengrui479937 @ 2023-12-01 11:26:28
#include<cstdio>
double a[305];
int main(){
int b;
scanf("%d",&b);
int c=0;//计数变量
double d=0.0,e=10000.0,f=0.0;
while(c<b){
scanf("%lf",&a[c]);
if(a[c]<e) e=a[c];//求最小
if(a[c]>f) f=a[c];//求最大
d+=a[c];//求总和
c++;
}
printf("%.2f %.2f\n",(d-e-f)/b,d/b-((d-e-f)/b));//输出
return 0;
}
by Three_no @ 2023-12-01 12:41:36
@zhanghengrui479937
by Three_no @ 2023-12-01 12:45:32
@zhanghengrui479937
by Three_no @ 2023-12-01 12:47:25
@zhanghengrui479937 是除去最大最小值后,每个有效样本与平均值得差值
by Three_no @ 2023-12-01 12:51:15
如果还是不会就@我