哥哥们,又遇到问题了,
#include <stdio.h>double av =0,max=0,min=0 ;
double average (inta);
double gl(intb);
void main()
{
int k ;
int c={0};
for (k=0;k<10;k++)
{
printf ("please input the students'grades :\n");
scanf ("thestudent's grade is %d ",&c);
}
av=average(c);
gl(c);
printf ("av=%5.2lf,max=%5.2lf,min=%5.2lf\n",av,max,min);
}
double average (inta)
{
int i;
for (i=0;i<10;i++)
{
av+=a;
}
av /=10;
return av;
}
double gl(intb)
{
int j;
max=b;
min=b;
for(j=0;j<10;j++)
{
if (max<=b)
{
max=b;
}
else if (min>=b)
{
min=b;
}
}
} 修改 scanf ("%d",c); 满满 发表于 2016-2-28 12:41
修改 scanf ("%d",c);
谢谢 我看看 满满 发表于 2016-2-28 12:41
修改 scanf ("%d",c);
谢谢你 ,刚刚改了,能运行,谢谢哥哥了
页:
[1]