下面的代码有什么问题,还有怎么改?真心不知道了
#include<stdio.h>void main()
{
struct Student
{
int num;
char name;
float score[3];
}student[5];
int i,j;
for(i=0;i<5;i++)
{
printf("please enter the number and name:\n");
scanf("%d %s",&student[i].num,&student[i].name);
for(j=0;j<3;j++)
{
printf("please enter the score[%d]:",j+1);
scanf("%d",&student[i].score[j]);
}
}
for(i=0;i<5;i++)
{
printf("%d %s\n",student[i].num,student[i].name);
for(j=0;j<3;j++)
{
printf("%d ",student[i].score[j]);
}
putchar('\n');
}
}