178个经典c语言源代码
大小:344 人气: 2010-02-08 需要积分:0
标签:C语言(118287)
178个经典c语言源代码:#define N 11float max=0,min=0;
float average(array,n)
float array[];
int n;
{ int i;
float aver,sum=array[0];
max=min=array[0];
for (i=1;i
else if (array[i]
}
aver=sum/N;
return (aver);
}
main()
{ float aver,score[N]={100,56,78,98.5,76,87,99,67.5,75,97,55};
int i,k,m=N;
aver=average(score,N);
printf("max=%5.2f,min=%5.2f,average=%5.2f\n",max,min,aver);
for (i=0;i
for (k=i;k
}
for (i=0;i
printf("\n");
非常好我支持^.^
(4) 80%
不好我反对
(1) 20%