有什么错误,我找不出来了,大哥们
#include <stdio.h>
int main()
{
int score[10]={67,98,75,63,82,79,81,91,66,84};
int sum;
int i,j,temp;
int aver;
for(i=0;i<10;i++)
{
sum += score[i];
}
aver == sum/10;
printf("%d,%d\n",sum,aver);
return 0;
}
void getScore(int score[] , int max)
{
for(i = 0;i<9;i++)
{
for(j=i+1;j<10;j++)
{
if(score[j]>score[i])
{
max = score[j];
score[i]=score[j];
score[j]=max;
}
}
}
return max;
}
int main()
{
getScore(int score[],int max);
printf("%d\n",max);
return 0;
}
void getHaha(int score[], int min)
{
for(i = 0;i<9;i++)
{
for(j=i+1;j<10;j++)
{
if(score[j]<score[i])
{
min = score[j];
score[i]=score[j];
score[j]=min;
}
}
}
return min,scare;
}
int main()
{
for(i = 0;i<9;i++)
{
printf("%d\n",score[i]);
}
getHaha(int score[],int min);
printf("%d\n",min);
return 0;
}