学生信息管理系统程序设计课程设计报告(编辑修改稿)内容摘要:

case 5:clrscr()。 print5()。 break。 case 6:clrscr()。 print6()。 break。 case 7: return 0。 } } return 0。 } include include /*struct student{ int studentnumber。 char name[20]。 char sex。 char profession[30]。 char clas[20]。 char tel[20]。 struct student *next。 }。 struct course{ int studentnumber。 int coursenumber。 char studentname[20]。 char coursename[20]。 int term。 float CR。 float normalmark。 float experimentmark。 float testmark。 float finalmark。 struct course *next。 }。 struct newcourse{ char stuname[20]。 char courname[20]。 int cournumber。 float couscore。 struct newcourse *next。 }。 struct stuaver{ char name[20]。 float aver。 struct stuaver *next。 }。 */ //统计每学期平均分 void account(struct course*chead1,int cournumber1,int term1){ struct course*cp。 int flag=0。 int n=0。 float sum=0。 cp=chead1。 if(cp==NULL){ printf(there is no course\n)。 } while(cp!=NULL){ if(cpcoursenumber==cournumber1amp。 amp。 cpterm==term1){ sum+=cpfinalmark。 n++。 flag=1。 } cp=cpnext。 } if(flag==0){ printf(there is no this course\n)。 } else printf(the average of this course is %f\n,(sum/n))。 } //统计不及格学生 void searchfail(int term1,int coursenumber1,struct course *head1){ struct course*cp。 int flag=0。 cp=head1。 if(cp==NULL){ printf(there is no data in it\n)。 } else{ while(cp!=NULL){ if(cpcoursenumber==coursenumber1amp。 amp。 cpterm==term1) if(cpfinalmark60) {printf(%s score is %f\n,cpstudentname,cpfinalmark)。 flag=1。 } cp=cpnext。 } if(flag==0){ printf(no student fail)。 } } } include include /*struct student{ int studentnumber。 char name[20]。 char sex。 char profession[30]。 char clas[20]。 char tel[20]。 struct student *next。 }。 struct course{ int studentnumber。 int coursenumber。 char studentname[20]。 char coursename[20]。 int term。 float CR。 float normalmark。 float experimentmark。 float testmark。 float finalmark。 struct course *next。 }。 struct newcourse{ char stuname[20]。 char courname[20]。 int cournumber。 float couscore。 struct newcourse *next。 }。 struct stuaver{ char name[20]。 float aver。 struct stuaver *next。 }。 */ //查找学生信息 void searchstudent(int studentnumber1,struct student *head){ struct student *p。 int flag=0。 p=head。 while(p!=NULL) { if(pstudentnumber==studentnumber1){ printf(*****************************************************************\n)。 printf(the student`s number is %d\n,pstudentnumber)。 printf(the student`s name is %s\n,pname)。 printf(the student`s sex is %c\n,psex)。 printf(the student`s profession is %s\n,pprofession)。 printf(the student`s class is %s\n,pclas)。 printf(the student`s tel is %s\n,ptel)。 printf(*****************************************************************\n)。 flag=1。 break。 } p=pnext。 } if(flag==0){ printf(*****************************************************************\n)。 printf(soorry,cannot find the student\n)。 printf(*****************************************************************\n)。 } } //查找课程信息 void searchcourse(int studentnumber1,int term1,struct course *chead){ struct course *cp。 int flag=0。 cp=chead。 while(cp!=NULL) { if(cpstudentnumber==studentnumber1amp。 amp。 cpterm==term1){ flag=1。 printf(*****************************************************************\n)。 printf(the %s`s final score is %f\n,cpcoursename,cpfinalmark)。 printf(*****************************************************************\n)。 } cp=cpnext。 } if(flag==0){ printf(there is no this course\n)。 } } //查找课程函数 void searchallstudentscore(int coursenumber1,int term1,struct student *head,struct course *chead){ struct student *p=head。 struct course *cp=chead。 int flag=0。 while(p!=NULL){ while(cp!=NULL){ if(cpstudentnumber==pstudentnumberamp。 amp。 cpcoursenumber==coursenumber1amp。 amp。 cpterm==term1){ flag=1。 printf(*****************************************************************\n)。 printf(the student is %s\n,pname)。 printf(term is %d\n,cpterm)。 printf(course number is %d\n,cpcoursenumber)。 printf(course name is %s\n,cpcoursename)。 printf(the normal mark is %f\n,cpnormalmark)。 printf(the experiment mark is %f\n,cpexperimentmark)。 printf(the test mark is %f\n,cptestmark)。 printf(the final mark is %f\n,cpfinalmark)。 printf(*****************************************************************\n)。 break。 } cp=cpnext。 } p=pnext。 } if(flag==0){ printf(there is no this course\n)。 } } include include /*struct student{ int studentnumber。 char name[20]。 char sex。 char profession[30]。 char clas[20]。 char tel[20]。 struct student *next。 }。 struct course{ int studentnumber。 int coursenumber。 char studentname[20]。 char coursename[20]。 int term。 float CR。 float normalmark。 float experimentmark。 float testmark。 float finalmark。 struct course *next。 }。 struct newcourse{ char stuname[20]。 char courname[20]。 int cournumber。 float couscore。 struct newcourse *next。 }。 struct stuaver{ char name[20]。 float aver。 struct stuaver *next。 }。 */ //删除一个学生信息 struct student *delestudent(int studentnumber1,struct student *head){ struct student *p1,*p2。 int flag=0。 p1=head。 p2=p1next。 if(head==NULL){ printf(there is no student in it.\n)。 return head。 }else{ while(p1。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。