#include <stdio.h>
int ZongScore()
{
int i;
int sum=0;
for(i=0;i<10;i++)
{
int score[];
sum=sum+score[i];
}
printf("考试的总分是%d",sum);
return 0;
}
int HighScore()
{
int i;
score=score[0];
for(i=0;i<10;i++)
{
if(score<score[i])
{
score=score[i];
}
}
printf("考试的最高分是%d",score);
return 0;
}
int LowScore()
{
int i;
score=score[0];
for(i=0;i<10;i++)
{
if(score>score[i])
{
score=score[i];
}
}
printf("考试的最低分是%d",score);
return 0;
}
int PingScore()
{
int ZongScore;
score=score/10;
printf("考试的平均分是%d",score);
return 0;
}
int PAIScore()
{
int i,j;
for(i=8;i>=0;i--)
{
for(j=0;j<=i;j++)
{
if(score[j]<score[j+1])
{
int score;
score=score[j];
score[j]=score[j+1];
score[j+1]=score;
}
}
}
print("考试成绩降序排列\n");
for(i=0;i<10;i++)
{
if(i != 9)
printf("%d,",score[i]);
else
printf("%d",score[i]);
}
return 0;
}
int main()
{
int score[N]={67,98,75,63,82,79,81,91,66,84};
ZongScore();
HighScore();
LowScore();
PingScore();
PAIScore();
return 0;
}
计量赵子龙
相关分类