commit 0a9be3892f548f6523728fd43e95371bbae811b1 Author: m40283156 <494899367@qq.com> Date: Thu Jan 10 11:43:36 2019 +0800 first commit diff --git a/date.text b/date.text new file mode 100644 index 0000000..e69de29 diff --git a/歌唱比赛 (2).c b/歌唱比赛 (2).c new file mode 100644 index 0000000..b5d0137 --- /dev/null +++ b/歌唱比赛 (2).c @@ -0,0 +1,133 @@ +#include +#include +#include +#define M 10 +#define N 3 +int add = N-1; +int sum[N]={0},Max[N],Min[N]; +float aver[N]={0}; +struct player +{ + int num;//Ñ¡ÊÖ±àºÅ// + char name[10];//Ñ¡ÊÖÐÕÃû// + int score[10];//Ê®¸öÆÀίµÄ³É¼¨// + float aver[10];//ƽ¾ù³É¼¨// +}; +void inplayerinfo(struct player a[],int n) //½á¹¹Ìå½øÐÐѧÉúÐÅÏ¢ÊäÈë// +{ + int i; + for(i=0;ia[i].score[j]) Min[i]=a[i].score[j]; //ÕÒµ½Ã¿¸öͬѧµÃµ½ÆÀ·ÖµÄ×î¸ß·ÖºÍ×îµÍ·Ö// + } + a[i].aver[10]=(float)(sum[i]-Max[i]-Min[i])/(M-2); //ÇóµÃÈ¥µô×î¸ß·ÖºÍ×îµÍ·ÖºóµÄƽ¾ù·Ö// + } + + for(i=0;i