求解答啊 不知道哪错了 运行不出来
#include <stdio.h>
int main()
{
int score[N]={67,98,75,63,82,79,81,91,66,84};
int total = fun1(score);
int max = fun2(score);
int min = fun4(score);
int average = total/10;
fun3(score);
printf("%d",max);
printf("%d",min);
printf("%d",total);
printf("%d",average);
return 0;
}
int fun1(int score[]){
int total = 0;
for(int i=0;i<10;i++){
total += score[i];
}
return total;
}
int fun2(int score[]){
int max;
for(int i=0;i<9;i++){
if(score[i]>max){
max = score[i];
}
}
return max;
}
int fun4(int score[]){
int min;
for(int i=0;i<9;i++){
if(score[i]<min){
min = score[i];
}
}
return min;
}
void fun3(int score[]){
for(int i=8;i>=0;i--){
for(int j=0;j<=i;j++){
if(score[j]<score[j+1]){
int temp;
temp=score[j];
score[j]=score[j+1];
score[j+1]=temp;
}
}
}
for(int i=0;i<10;i++){
printf("%d ",score[i]);
}
}