#include<stdio.h>
int max = 0, min = 0,score;
int main()
{
int average(int arry[], int n);
int i,k[10],aver,sum;
sum = 0;
for (i = 0; i < 10; i++)
{
scanf_s("%d", &k[i]);
}
aver = average(score,10);
printf("%d%d%d",max,min,aver);
while (1)
;
}
int average(int arry[], int n)
{int i;
int aver, sum = arry[0];
for (i = 1; i < n; i++)
{
if (arry[i] > max)max = arry[i];
else if (arry[i] < min)min = arry[i];
sum = sum + arry[i];
}
aver = sum / n;
return (aver);
}
"int" 类型的实参与 "int *" 类型的形参不兼容 “int average(int [],int)”: 无法将参数 1 从“int”转换为“int []
qq___524
相关分类