#include<stdio.h> int main(){ int count=20; double average; int a[20]; int i; int sum=0,min,max; for(i=0;i<20;i++){ scanf("%d",a+i); if(i==0) min=max=a[0]; else if(a[i]>max) max=a[i]; else if(a[i]<min) min=a[i]; sum+=a[i]; } average=1.0*(sum-max-min)/(count-2); printf("count=%d,average=%f",count,average); }