资源描述:
《C语言编写的简单学生成绩管理系统》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、C语言编写的简单学生成绩管理系统C语言编写的简单学生成绩管理系统#include"stdio.h"#include"stddef.h"#include"stdlib.h"#include"conio.h"/*屏幕操作函数*/#include"string.h"#defineMAX10typedefstructstudent{charname[MAX];charnum[MAX];charsex[MAX];intage;intchinese;intmathematic;intenglish;floataver;structstuden
2、t*next;}stu;stu*head;voidprint()/*输出菜单*/{textcolor(RED);/*设置文本显示颜色为红色*/textbackground(GREEN);/*设置背景颜色为绿色*/window(1,1,80,10);/*制作显示菜单的窗口*/clrscr();printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");printf("************welcometousestudentmanage***
3、**************");printf("***********************MENU*****************************");printf("*****<1>EnterRecord");/*录入信息*/printf("<2>Statistics*****");/*显示成绩*/printf("*****<3>Quest");/*查询*/printf("<4>Updata*****");/*修改*/printf("*****<5>Save");/*保存到磁盘*/printf("
4、<6>Display*****");/*统计成绩*/printf("*****<7>Fresh");/*刷新*/printf("<8>Quit*****");/*退出系统*/printf("$$$$$$Maker:zhangwantongClass:045Date:2007.01.12$$$$$$$");printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");}voidcin(stu*p1)/*录入学生信息*/{printf("
5、Entername:");scanf("%s",p1->name);printf("Enternum:");scanf("%s",p1->num);printf("Entersex:");scanf("%s",&p1->sex);printf("Enterage:");scanf("%d",&p1->age);printf("Enterscore:");printf("Enterchinese:");scanf("%d",&p1->chinese);printf("Entermath:");scanf(
6、"%d",&p1->mathematic);printf("EnterEnglish:");scanf("%d",&p1->english);p1->aver=(p1->chinese+p1->mathematic+p1->english)/3.0;/*平均分*/}voidcindata()/*是否继续录入*/{stu*p1,*p2;inti=1;charch;head=(stu*)malloc(sizeof(stu));p1=head;/*头指针*/while(i){cin(p1);printf("DoyouWanttoCo
7、ntinue?yesorno:");ch=getchar();ch=getchar();if(ch=='n'
8、
9、ch=='N'){i=0;p1->next=NULL;}else{p2=p1;p1=(stu*)malloc(sizeof(stu));p2->next=p1;}}}voidlookdata(stu*p1)/*输出所有信息*/{printf("---------------------------------------------------------------------------");while(p1!=
10、NULL){printf("Num:%s",p1->num);printf("Name:%s",p1->name);printf("Sex:%s",p1->sex);printf("Age:%d",p1->age);/*printf("");*