不知道怎么错了下面是代码,求大佬解问😭
#include "stdio.h"
#define N 2
struct Student
{
char szNum[6];
char szName[8];
int iScore[3];
}stu[N];
void input(struct Student stu[N])
{
int i,j;
for(i=0;i<N;i++)
{
printf("\nplease input %d of %d\n",i+1,N);
printf("num: ");
scanf("%s",stu[i].szNum);
printf("name: ");
scanf("%s",stu[i].szName);
for(j=0;j<3;j++)
{
printf("score %d. ",j+1);
scanf("%d",stu[i].iScore[j]);
}
printf("\n");
}
}
void print(struct Student stu[N])
{
int i,j;
printf("\nNo.\tName\tSco1\tSco2\tSco3\n");
for(i=0;i<N;i++)
{
printf("%s\t%s\t",stu[i].szNum,stu[i].szName);
for(j=0;j<3;j++)
printf("%d\t",stu[i].iScore[j]);
printf("\n");
}
}
void main()
{
input(stu);
print(stu);
}