#include <stdio.h>
#include <stdlib.h>
int main()
{
double num1,num2,num3,num4,num5,num6,num7,num8,num9,mix=10.0,max=0.0,score;
scanf("%lf%lf%lf%lf%lf%lf%lf%lf%lf",&num1,&num2,&num3,&num4,&num5,&num6,&num7,&num8,&num9);
if(num1<mix)
mix=num1;
if(num2<mix)
mix=num2;
if(num3<mix)
mix=num3;
if(num4<mix)
mix=num4;
if(num5<mix)
mix=num5;
if(num6<mix)
mix=num6;
if(num7<mix)
mix=num7;
if(num8<mix)
mix=num8;
if(num9<mix)
mix=num9;
if(num1>max)
max=num1;
if(num2>max)
max=num2;
if(num3>max)
max=num3;
if(num4>max)
max=num4;
if(num5>max)
max=num5;
if(num6>max)
max=num6;
if(num7>max)
max=num7;
if(num8>max)
max=num8;
if(num9>max)
max=num9;
score=num1+num2+num3+num4+num5+num6+num7+num8+num9-mix-max;
score/=7;
printf("%.3f\n",score);
return 0;
}
知识点总结:这个题的思想值得琢磨,以后要学会有这种思维模式。
学习心得:之前的作业没有做完,今天补上,现在发现其实只要用心,一些题是很容易的。以后要坚持完成作业。