求赐教 这编程不知道写的对不对
题:在一次演讲比赛中有10个评分员,选手最后得分去掉一个最高分和一个最低分后的平均数,现求这10个选手的分数,输出最后得分。# include "stdio.h"
# define A 10
main ()
{
float x[A] , i;
float max ,min , sum = 0.0;
float ave;
for ( i = 0; i<A; i++ )
scant( " %d " , &x[i] );
max = x[0]
for ( i = 1; i < A; i++ )
if ( max < x[i] )
max = x[i];
min = x[0]
for (i = 1; i < A; i++ )
if ( min > x[i] )
min = x[i];
for ( i = 0; i < A; i++ )
sum = sum + x[i];
ave = ( sum - max - min ) / A;
printf ( "选手最后得分%d". ave);
}