#include #include int N1,N2,kk1,kk2,kk3; struct couse * head1; struct student * head2; struct couse//课程信息结构体 { int num1; char name1[20]; int score; int nelepeo;//课程已选人数 int Melepeo;//课程人数上限 struct couse * next; }; struct student//学生信息结构体 { int num2; char name2[20]; int nelenum[50];//已选课程编号 int nelen;//已选课程数量 struct student * next; }; void Ms() { for(kk1=0;kk1score,&p1->Melepeo); p1->nelepeo=0; head1=NULL; while(p1->num1
=0) { N1=N1+1; if(N1==1)head1=p1; else p2->next=p1; p2=p1; p1=(struct couse * )malloc(sizeof(struct couse)); scanf("%d%s%d%d",&p1->num1,p1->name1,&p1->score,&p1->Melepeo); p1->nelepeo=0; } p2->next=NULL; } void filec()//录入键盘子函数(从文件录入) { FILE * fp; char filepath[20]; struct couse *p1,*p2; N1=0; printf("输入要读入的文件路径:"); getchar(); gets(filepath); if((fp=fopen(filepath,"r"))==NU