求大佬教教我哪里错了
#define N 10
#include <stdio.h>
int all(int score[])//总和
{
int sum = 0;
for (int i = 0; i < N; i++)
{
sum += score[i];
}
return sum;
}
int max(int score[])//最大值
{
int temp = 0;
for (int i = 0; i < 5; i++)
{
for (int k = 0; k < 10 - i; k++)
{
if (score[i] < score[k])
{
temp = score[i];
score[i] = score[k];
score[k] = temp;
}
}
}
int max;
max=score[9];
return max;
}
int min(int score[])//最小值
{
int temp = 0;
for (int i = 0; i < 5; i++)
{
for (int k = 0; k < 10 - i; k++)
{
if (score[i] < score[k])
{
temp = score[i];
score[i] = score[k];
score[k] = temp;
}
}
}
int min = score[0];
return min;
}
int ping(int all)//平均数
{
int ping = all / N;
return ping;
}
void jian(int score[])//降低排序
{
int temp = 0;
for (int i = 0; i < 5; i++)
{
for (int k = 0; k < 10 - i; k++)
{
if (score[i] > score[k])
{
temp = score[i];
score[i] = score[k];
score[k] = temp;
}
}
}
for (int i = 0; i < N; i++)
{
printf("%d\n", score[i]);
}
}
int main()//主函数
{
int score[N] = { 67,98,75,63,82,79,81,91,66,84 };
int all = all( score);
int max = max( score);
int min = min( score);
int average = ping(all);
jian(0);
return 0;
}