为什么老是有错误,是不是想法错了,是统计小于60和统计大于80的那个成绩的人数,帮帮忙
struct student{ long int number;
char name[10];
float s[5];
}stu[N]={{10010,"lin",1,1,1,1,1},
{10011,"huang",0,0,0,0,0},
{10012,"cheng",2,2,2,2,2}
};
void Statistics()
{ int i,j,m=0,b=0,a[5],d[5];
float k=60,c=80;
for (j=0;j<5;j++)
{for (i=0;i<3;i++)
{if (stu[i].s[j]<k)
{printf("||number||name ||\n");
printf("||%ld ||%s ||\n",stu[i].number,stu[i].name);
m++;}
a[j]=m;
printf("the student don't pass exam%d's number=:%d\n",j,a[j]);
}
for (j=0;j<5;j++)
{for (i=0;i<3;i++)
{if (stu[i].s[j]>c)
{printf("||number||name ||\n");
printf("||%ld ||%s ||\n",stu[i].number,stu[i].name);
b++;}
d[j]=b;
printf("the student don't pass exam%d's number=:%d\n",j,d[j]);
}
}