#include <stdio.h>
int a()
{
int sum=0 ;
int i;
int score[10]={67,98,75,63,82,79,81,91,66,84};
for(i=0;i<10;i++)
{
sum+=score[i];
}
printf("考试总分%d\n,平均分%d\n",sum,sum/10);
return 0;
}
int b()
{
int score[10]={67,98,75,63,82,79,81,91,66,84};
int max=score[0], j;
for(j=1;j<10;j++)
{
if(score[j]>max)
{
max=score[j];
}
}
printf("最高分是%d\n"max);
return 0;
}
int c();
{
int score[10]={67,98,75,63,82,79,81,91,66,84};
int min=score[0], m;
for(m=1;m<10;m++)
{
if(score[m]<min)
{
min=score[m];
}
}
printf("最低分是%d\n"min);
return 0;
}
int d();
{
int score[10]={67,98,75,63,82,79,81,91,66,84};
int z ,x,h;
for(z=9;z>0;z--)
{
for(x=0;x<=z;x++)
{
if(score[x]<score[x+1])
{
h=score[x];
score[x]=score[x+1];
score[x+1]=h;
}
}
}
for(x=0;x<10;x++)
{
printf(" 降序之后为%d\n",score[x]);
}
return 0 ;
}
int main()
{
a();
b();
c();
d();
return 0;
}