大神 帮忙看看程序为什么不能运行啊
#include"stdio.h"struct score
{
float chinese;
float math;
float C;
};
struct student
{
int num;
char sex;
struct score scor[3];
char name[20];
};
int main()
{
void input(struct student a[]);
void print(struct student stu[]);
struct student stu[3],* p;
p=stu;
input(p);
print(p);
return 0;
}
void input(struct student a[])
{
printf("please input date\n");
int i;
for(i=0;i<3;i++)
scanf("%d%c%s%f%f%f",&a[i].num ,&a[i].sex ,a[i].name ,&a[i].scor[0],&a[i].scor[1],&a[i].scor[2]);
}
void print(struct student stu[])
{
printf("学号\t姓名\t性别\t语文\t数学\tC语言\n");
int i;
for(i=0;i<3;i++)
printf("%d\t%s\t%c\t%f\t%f\t%f\n",stu[i].num,stu[i].name,stu[i].sex,stu[i].scor[0],stu[i].scor[1],stu[i].scor[2]);
}