term does not evaluate to a function要输入十个整数,计算出正整数的个数,和正整数的平均值,#include "stdio.h"void main(){\x05int i,m=0,a[10];\x05scanf("%d",a[i]);\x05for(i=0;i0)m++;\x05printf("The number is:%d\n",m);\x05int averag

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/02 08:24:20
term does not evaluate to a function要输入十个整数,计算出正整数的个数,和正整数的平均值,#include
xT_kP*1$M5MmCnrjgI:2D&n>n4]ޛڱ |rorssN˛Mfkㆌz}L2"^~==[||s'׏Tuql[Ymt-z#ɰA[+. S* rBqv[(,iDJlXʱrj v<Ǝ&m4 pa9"NKK;CxD ~gckx;>=ƹX% |O Ӕ)IA~TnDĥ3ȤL'sPa|>L[ry>zJB`5rv\,DԼH-y+yAjdzv32;mgSn!=m[`eh0

term does not evaluate to a function要输入十个整数,计算出正整数的个数,和正整数的平均值,#include "stdio.h"void main(){\x05int i,m=0,a[10];\x05scanf("%d",a[i]);\x05for(i=0;i0)m++;\x05printf("The number is:%d\n",m);\x05int averag
term does not evaluate to a function
要输入十个整数,计算出正整数的个数,和正整数的平均值,
#include "stdio.h"
void main()
{
\x05int i,m=0,a[10];
\x05scanf("%d",a[i]);
\x05for(i=0;i0)m++;
\x05printf("The number is:%d\n",m);
\x05int average(a[10]);
\x05int d;
\x05d=average(a[10]);
\x05printf("The average is:%d\n",d);
\x05\x05
}
int average(int a[10])
{
\x05int i,b=0,c=0;
\x05for(i=0;i0)
\x05\x05{
\x05\x05\x05b=b+a[i];
\x05\x05\x05c++;
\x05\x05}
\x05b=b/c;\x05
\x05return(b);
}

term does not evaluate to a function要输入十个整数,计算出正整数的个数,和正整数的平均值,#include "stdio.h"void main(){\x05int i,m=0,a[10];\x05scanf("%d",a[i]);\x05for(i=0;i0)m++;\x05printf("The number is:%d\n",m);\x05int averag
#include "stdio.h"
void main()
{
\x09int i,m=0,a[10];
\x09printf("请输入十个整数:\n");
\x09for(i=0;i<10;i++)
\x09scanf("%d",&a[i]);//这里修改了
\x09for(i=0;i<=9;i++)
\x09\x09if(a[i]>0)m++;
\x09printf("The number is: %d\n",m);
\x09int average(int a[],int n);
\x09int d;
\x09d=average(a,10);
\x09printf("The average is: %d\n",d);
\x09\x09
}
int average(int a[],int n)//参数改一下!
{
\x09int i,b=0,c=0;
\x09for(i=0;i<=9;i++)
\x09\x09if(a[i]>0)
\x09\x09{
\x09\x09\x09b=b+a[i];
\x09\x09\x09c++;
\x09\x09}
\x09b=b*1.0/c;\x09
\x09return(b);
}
你看一下!对比一下!