#include <stdio.h>
int main()
{
int score[n]={67,98,75,63,82,79,81,91,66,84};
int n;
int sum;
int average;
for(n=9;n>=0;n--)
{
int temp;
int m
for(m=0;m<n;m++)
{
if(score(m)<score(m+1))
{
temp=score(m);
score(m)=score(m+1);
score(m+1)=temp;
}
}
sum+=score(n);
}
printf("降序排列%d\n",score);
printf("考试总分%d\n",sum);
printf("最高分%d\n",score(0));
printf("最低分%d\n",score(9));
printf("平均分%d\n",sum/10);
return 0;
}
这行代码运行不出来,哪错了?
求最大值最小值要先取定一个值,一般取第一个...
数组用[ ],不用( )...