#include <stdio.h>
void main()
{
float score[10], sumScore, minScore, maxScore;
int i, j;
for (i = 0; i < 9; i ++)
{
printf("please input %d score\n", i + 1);
scanf("%f", &score[i]);
}
sumScore = minScore = maxScore = score[0];
for (j = 1; j < 9; j ++)
{
if (score[j] > maxScore)
{
maxScore = score[j];
}
else if (score[j] < minScore)
{
minScore = score[j];
}
sumScore += score[j];
}
sumScore -= maxScore;
sumScore -= minScore;
printf("the average is %f\n", sumScore/7);
}