int cmp(const void* a,const void* b){ return *(int*)a-*(int*)b; } double trimMean(int* arr, int arrSize){ qsort(arr,arrSize,sizeof(int),cmp); int num=arrSize/20,i; double sum=0.0; for (i=num; i<arrSize-num; i++) sum+=arr[i]; return sum/(arrSize-2*num); }