给位高手,麻烦帮我看下这个程序哪些地方有问题吧,先谢过啦。
#include<stdio.h>#include<string.h>
#define FORMAT "%d,%s,%c,%d,%d,%d,%f,%f,%f,%f,%f"
struct date
{
int year;
int month;
int day;
};
typedef struct
{
int Num;
char Name[10];
char Sex;
float English,DataStructure,CPlusPlus;
float Sum,Average;
}Student;
Student stud[100];
struct Date date1[100];
int count=0;
void ReadData(Student*p1,Data*p2)
{
for(count=0;count<100;count++)
{
printf("请输入第%d个学生信息:",++count);
scanf(FORMAT,&p1->Num,p1->Name,&p1->Sex,&p2->year,&p2->month,&p2->day,&p1->English,&p1->DataStructure,&p1->CPlusPlus,&p1->Sum,&p1->Average);
printf("\n");
}
}
void Display(Student*p1,Date*p2)
{
for(count=0;count<100;count++)
{
printf(FORMAT,p1->Num,p1->Name,p1->Sex,p2->year,p2->month,p2->day,p1->English,p1->DataStructure,p1->CPlusPlus,p1->Sum,p1->Average);
printf("\n");
}
}
void main()
{
ReadData(&stud,&date1);
Display(&stud,&date1);
}