C 语言学生选课系统(代码)#include#include#includeintN1,N2;structstudentintnum2;charname2[20];intnelenum[50];//所选课程编号intnelen;//所选课程学分和structstudent*next;structcourseintnum1;//课程编号charname1[20];charmajor[20];chartype[20];intcredit;intperiod;charteacher[20];intpeople;//选此门课程的人数structcourse*next;//结构体指针structcourse*head1;structstudent*head2;voidzhang()//从键盘录入课程信息structcourse*p1,*p2;N1=0;p1=p2=(structcourse*)malloc(sizeof(structcourse));printf("课程编号\t 课程名称\t 主修\t 课程性质\t 学分\t 课时\t 老师\n");scanf("%d%s%s%s%d%d%s",&p1->num1,p1->name1,p1->major,p1->type,&p1->credit,&p1->period,p1->teacher);p1->people=0;head1=NULL;while(p1->num1
=0)N1=N1+1;if(N1==1)head1=p1;elsep2->next=p1;p2=p1;p1=(structcourse*)malloc(sizeof(structcourse));scanf("%d%s%s%s%d%d%s",&p1->num1,p1->name1,p1->major,p1->type,&p1->credit,&p1->period,p