请问一下我这个哪里有问题?
#include <stdio.h>
int N;
int totalsc(int score[]){
int i,total;
for(i=0;i<N;i++){
total+=score[i];
}
return total;
}
int maxsc(int score[]){
int i,max;
max=score[0];
for(i=0;i<N;i++){
if(score[i]>max)
max=score[i];
}
return max;
}
int minsc(int score[]){
int i,min;
min=score[0];
for(i=0;i<N;i++){
if(score[i]<min)
min=score[i];
}
return min;
}
int avgsc(int score[]){
int i,total,avg;
for(i=0;i<N;i++){
total+=score[i];
}
avg=total/N;
return avg;
}
int sort(int score[]){
int i,temp;
for(i=0;i<N;i++){
if(score[i]<score[i+1])
temp=score[i+1];
score[i+1]=score[i];
score[i]=temp;
}
return score[i];
printf("考试排名%d",score[i]);
}
int main()
{
int score[10]={67,98,75,63,82,79,81,91,66,84};
int min,max,avg,total;
N=10;
min=minsc(score);
max=maxsc(score);
avg=avgsc(score);
total=totalsc(score);
printf("总分为:%d",total);
printf("最高分%d,最低分%d,平均分%d",max,min,avg);
sort(score);
return 0;
}