#include<stdio.h>
#define N 2
struct STUDENT
{
char name[20];
int number;
float Math;
float English;
float Chinese;
};
struct STUDENT student[N];
void main()
{
int i;
struct STUDENT *p;
p=student;
printf("please input ten stuents' information!\n");
for(i=0;i<N;i++,p++)
scanf("%s,%d,%f,%f,%f",p->name,&p->number,&p->Chinese,&p->Math,&p->English);
for(i=0;i<N;i++,p++)
printf("%s,%d,%f,%f,%f\n",p->name,p->number,p->Chinese,p->Math,p->English);
}
输入学生的姓名,学号,三科成绩,再输出,编译正确,却得不到正确答案,不知为什么?