十个评委打分,去最低和最高,求均分

//十个评委打分,去最低和最高,求均分
#include<stdio.h>
int main()
{
int score,sum=0,i,ave;
int max=-32768,min=32767;
for(i=0;i<10;i++)
{
printf("Input %d score: ",i);//别写成printf("Iput i score:");
scanf("%d",&score);
sum+=score;
if(max<score)
max=score;
if(min>score)
min=score;
}
ave=(sum-max-min)/8;
printf("Cancelled score are:%d %d\n",max,min);
printf("Final score is:%d\n",ave);
return 0;
}

 

上一篇:Elsticsearch 自动补全以及基于上下文的提示


下一篇:sublime text 3 mac如何导入模块?