请帮我看看为什么全局变量不能赋值
#include <Stdio.h>float Max = 0, Min = 0;
main()
{
float a[10] = { 89,95,87.5,100,67.5,97,59,84,73,90 };
float aver ( float x[] );
printf ("%f\nmax is %f\nmin is %f\n",aver(a),Max,Min);
}
float aver ( float x[] )
{
float sum = 0, av;
int i;
for ( i = 0; i < 10; i++ )
{
sum = sum + x[i];
if ( x[i] > Max )
Max = x[i];
if ( x[i] < Min )
Min = x[i];
}
av = sum / 10;
return av;
}
为什么Max和Min输出还是0?