学生成绩管理系统C语言代码.doc学生成绩管理系统C语言代码.doc

收藏 分享

资源预览需要最新版本的Flash Player支持。
您尚未安装或版本过低,建议您

“学生学习成绩管理系统”用于对学生学习成绩数据文件的新文件创建和老文件管理,并可以进行密码设置。具体要求实现的功能如下1、输入/添加记录将每一个学生的学号、姓名和各科学习成绩作为一个记录进行输入或添加。要求经过密码验证后能建立一个新的数据文件或给已建立好的数据文件增加记录。2、显示、查询记录能按学生姓名(或学号)显示、查询一个或多个学生的各门(或某门)功课的成绩和平均成绩。3、修改记录可以对数据文件中的任意记录的数据进行修改,在修改前后对该记录的内容进行显示,并设确认提示。(要求设置密码,验证通过后方可进入修改环节)4、删除记录可以删除数据文件中的任一记录,包括逻辑删除(具有恢复功能)和物理删除(不可恢复)。(说明该功能也应设置为经过验证密码后才可实施删除)5、成绩排序采用不同的排序方法对单科成绩和总(或平均)成绩进行排序,但不能改变原记录的顺序。6、统计功能(A)计算各门课程全班总成绩及平均成绩;(B)统计各门课程得分为100、9099、8089、7079、6069和不及格学生的人数,以及与全班总人数的百分比。7、其他该软件应具有系统名称、设计单位或个人等基本信息。学生成绩管理系统源程序清单INCLUDESTDIOHINCLUDESTRINGHINCLUDEMALLOCHINCLUDECONIOHDEFINENULL0DEFINELENSIZEOFSTUDENTDEFINEN5TYPEDEFSTRUCTSTU{INTFLAG;LONGNUM;CHARNAME10;INTSCOREN;STRUCTSTUNEXT;}STUDENT;VOIDEDIT;/编辑菜单/VOIDSEARCHSTUDENTHEAD;/查找函数/STUDENTSEARCH_NUMBERSTUDENTHEAD,LONGNUMBER;/按学号查找/VOIDSEARCH_NAMESTUDENTHEAD;/按姓名查找/STUDENTSEARCH_SCORESTUDENTHEAD,INTMIN,INTMAX,INTI;/按成绩查找/VOIDENTER_RECORDSTUDENTP;/输入成绩/STUDENTCREATVOID;/建立链表/STUDENTINSERTSTUDENTHEAD;/插入结点/VOIDCOUNTINTP;/计算总成绩及平均成绩/VOIDPRINTSTUDENTP;/输出结点/VOIDPRINT_TITLE;/输出标题/STUDENTDELETESTUDENTHEAD;/删除结点/VOIDRECOVERSTUDENTHEAD;/恢复删除/VOIDREVISESTUDENTHEAD;/修改记录/VOIDTONGJISTUDENTHEAD;/统计/VOIDPAIXUSTUDENTHEAD,INTM;/排序/INTCIPHER_CHECK;/密码检测/VOIDSET_UP_CIPHER;/设立密码/STUDENTLOAD;/载入/VOIDSAVESTUDENTHEAD;/保存/VOIDABOUT;/关于/INTN;CHARCIPHER11{};/字符串,保存密码/MAIN{CHARC;STUDENTHEADNULL;SYSTEMCLS;ABOUT;FOR;;{SYSTEMCLS;PRINTF\N;PRINTF\T\TWELCOMETO\N;PRINTF\N\T\TTHESTUDENTSCOREMANAGESYSTEM\N;PRINTFMENU\N;PRINTF\T\T\T1CREATTHERECORD\N;PRINTF\T\T\T2LOADTHEFILE\N;PRINTF\T\T\T3EDITTHERECORD\N;PRINTF\T\T\T4ABOUTDESIGN\N;PRINTF\T\T\T5QUIT\N;PRINTF\N;PRINTF\N\T\T\TENTERYOURCHOICE15;FOR;;{CGETCHAR;IFC\NCONTINUE;ELSEIFC1||C5PRINTF\T\T\TENTERYOURCHOICE15;ELSEBREAK;}GETCHAR;SWITCHC{CASE1HEADCREAT;IFHEADNULL{PRINTFEMPTYRECORD\N\NENTERANYKEYTOCONTINUE\N;GETCH;BREAK;}SET_UP_CIPHER;PRINTFENTERANYKEYTOEDITMENU;GETCH;EDITHEAD;BREAK;CASE2HEADLOAD;IFHEADNULL{PRINTF\NENTERANYKEYTOCONTINUE;GETCH;BREAK;}PRINTFENTERANYKEYTOEDITMENU;GETCH;EDITHEAD;BREAK;CASE3EDITHEAD;BREAK;CASE4ABOUT;BREAK;CASE5EXIT0;}}}VOIDEDITSTUDENTHEAD/编辑菜单/{CHARC,M;INTI,F0;FOR;;{SYSTEMCLS;PRINTFEDITMENU\N;PRINTF\T\T\T1SAVETHERECORD\N;PRINTF\T\T\T2INSERTARECORD\N;PRINTF\T\T\T3DELETEARECORD\N;PRINTF\T\T\T4RECOVERTHERECORD\N;PRINTF\T\T\T5REVISETHERECORD\N;PRINTF\T\T\T6SEARCHRECORDS\N;PRINTF\T\T\T7SORTTHERECORDS\N;PRINTF\T\T\T8TONGJITHERECORDS\N;PRINTF\T\T\T9CHANGETHEPASSWORD\N;PRINTF\T\T\T0RETURNTOMAINMENU\N;PRINTF\N;PRINTF\T\T\TENTERYOURCHOICE09;FOR;;{CGETCHAR;IFC\NCONTINUE;ELSEIFC0||C9PRINTF\T\T\TENTERYOURCHOICE09;ELSEBREAK;}SWITCHC{CASE1SAVEHEAD;F0;BREAK;CASE2PRINTFPLEASEENTERTHERIGHTPASSWORD\N;IFCIPHER_CHECK0{PRINTFWRONGPASSWORD\N;BREAK;}HEADINSERTHEAD;F1;BREAK;CASE3PRINTFPLEASEENTERTHERIGHTPASSWORD\N;IFCIPHER_CHECK0{PRINTFWRONGPASSWORD\N;BREAK;}HEADDELETEHEAD;F1;BREAK;CASE4PRINTFPLEASEENTERTHERIGHTPASSWORD\N;IFCIPHER_CHECK0{PRINTFWRONGPASSWORD\N;BREAK;}RECOVERHEAD;F1;BREAK;CASE5PRINTFPLEASEENTERTHERIGHTPASSWORD\N;IFCIPHER_CHECK0{PRINTFWRONGPASSWORD\N;BREAK;}REVISEHEAD;F1;BREAK;CASE6SEARCHHEAD;BREAK;CASE7PRINTFSORTONWHICHSUBJECT\N;PRINTFSCORE11/SCORE22/SCORE33/SUM4\N;FOR;;{SCANFC,M;IFM\N;ELSEIFM1M4BREAK;ELSEPRINTFERRORENTERAGAIN;}IM01;PAIXUHEAD,I;BREAK;CASE8TONGJIHEAD;BREAK;CASE9PRINTFPLEASEENTERTHEOLDPASSWORD\N;IFCIPHER_CHECK{SET_UP_CIPHER;F1;}ELSEPRINTFWRONGPASSWORD\N;BREAK;CASE0IFF1{CHARC;PRINTFTHISRECORDHASALREADYBEENREVISED\NSAVETHERECORDORNOT;FOR;;{CGETCHAR;IFC\NCONTINUE;ELSEIFCY||CY{SAVEHEAD;BREAK;}ELSEIFCN||CNBREAK;ELSEPRINTFERRORENTERAGAIN;}}RETURN;}PRINTF\NENTERANYKEYTORETURN;GETCH;}}STUDENTCREATVOID/建立链表/{STUDENTHEAD,P1,P2;N0;P1STUDENTMALLOCLEN;P2NULL;PRINTFPLEASEENTERNUMBER;PRINTFENTER0TOEND\N;SCANFLD,P1NUM;HEADNULL;WHILEP1NUM0{N;ENTER_RECORDP1;IFN1HEADP1;ELSEP2NEXTP1;P2P1;P1STUDENTMALLOCLEN;PRINTFPLEASEENTERNEXTNUMBER0TOEND\N;SCANFLD,P1NUM;}IFN0P2NEXTNULL;FREEP1;RETURNHEAD;}STUDENTINSERTSTUDENTHEAD/插入结点/{STUDENTP1,P2,NEW_NODE;FOR;;{NEW_NODESTUDENTMALLOCLEN;IFNEW_NODENULL{PRINTFDATABASEISFULL,CANTADDMORERECORD\N;RETURNNULL;}PRINTF\NPLEASEENTERTHENUMBERYOUWANTTOINSERT\NENTER0TOEND;SCANFLD,NEW_NODENUM;IFNEW_NODENUM0{BREAK;}FORP1HEAD,P2NULL;P1NULLNEW_NODENUMP1NUM;P2P1,P1P1NEXT;IFP1NULLP1NUMNEW_NODENUMP1FLAG1{CHARC;PRINTFTHISNUMBERALREADYEXISTS\N;PRINT_TITLE;PRINTP1;PRINTFCOVERORNOTY/N;FOR;;{CGETCHAR;IFCN||CN{FREENEW_NODE;BREAK;}ELSEIFCY||CY{FREENEW_NODE;ENTER_RECORDP1;BREAK;}ELSEIFC\NPRINTFERRORENTERAGAIN;ELSECONTINUE;}}ELSEIFP1NULLP1NUMNEW_NODENUM{N;FREENEW_NODE;ENTER_RECORDP1;}ELSE{N;ENTER_RECORDNEW_NODE;NEW_NODENEXTP1;IFP2NULLHEADNEW_NODE;ELSEP2NEXTNEW_NODE;}}RETURNHEAD;}STUDENTDELETESTUDENTHEAD/删除结点/{LONGNUMBER;CHARC;STUDENTP1,P2;FOR;;{PRINTFPLEASEENTERTHENUMBERYOUWANTTODELETEENTER0TOEND\N;SCANFLD,NUMBER;IFNUMBERBREAK;FORP1HEAD,P2NULL;P1NULLP1NUMNUMBER;P2P1,P1P1NEXT;IFP1NULL||P1FLAG0{PRINTFTHISNUMBERDOESNTEXIST\N;}ELSE{PRINT_TITLE;PRINTP1;PRINTFDELETETHISRECORD\N;PRINTFSURES/CANCLEC/DELETETHOROUGHLYT\N;FOR;;{CGETCHAR;IFCC||CCBREAK;ELSEIFCS||CS||CT||CT{N;IFCS||CSP1FLAG0;ELSE{IFP2NULLHEADP1NEXT;ELSEP2NEXTP1NEXT;FREEP1;}BREAK;}ELSEIFC\NPRINTFERRORENTERAGAIN;}}}RETURNHEAD;}VOIDRECOVERSTUDENTHEAD/恢复删除/{STUDENTP;LONGNUMBER;PRINTFRECOVERWHICHNUMBER\N;SCANFLD,NUMBER;IFNUMBER0RETURN;PSEARCH_NUMBERHEAD,NUMBER;IFPNULLPRINTFCANTRECOVERTHISNUMBER\N;ELSEIFPFLAG1PRINTFTHISNUMBERHASNOTBEENDELETED\N;ELSE{N;PFLAG1;PRINTFRECOVERSUCCESS\N;}}VOIDREVISESTUDENTHEAD/修改记录/{CHARC;LONGNUMBER;STUDENTP1;FOR;;{PRINTFWHICHNUMBERDOYOUWANTTOREVISE\NENTER0TOEND;SCANFLD,NUMBER;IFNUMBER0RETURN;P1SEARCH_NUMBERHEAD,NUMBER;IFP1NULL||P1FLAG0{PRINTFTHISNUMBERDOESNTEXIST\N;CONTINUE;}PRINT_TITLE;PRINTP1;PRINTFDOYOUWANTTOREVISETHERECORDY/N\N;FOR;;{CGETCHAR;IFC\NCONTINUE;ELSEIFCN||CNBREAK;ELSEIFCY||CY{PRINTFPLEASEENTERNEWRECORD\N;ENTER_RECORDP1;PRINTFTHENEWRECORDIS\N;PRINT_TITLE;PRINTP1;BREAK;}ELSEPRINTFERROR,ENTERAGAIN;}}}VOIDSEARCHSTUDENTHEAD/查找函数/{CHARC;INTI,MIN,MAX;LONGNUMBER;STUDENTP;PRINTFPLEASEENTERSEARCHCONDITIONS\N;PRINTFALLA/NUMBERN/NAMEM/SCORES/RETURNR\N;FOR;;{CGETCHAR;IFC\NCONTINUE;ELSEIFCS
编号:201312012327278619    类型:共享资源    大小:112.50KB    格式:DOC    上传时间:2013-12-01
  
9
关 键 词:
专业文献 学术论文 精品文档 学生成绩
  人人文库网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文
本文标题:学生成绩管理系统C语言代码.doc
链接地址:http://www.renrendoc.com/p-138619.html

当前资源信息

4.0
 
(2人评价)
浏览:14次
21ask上传于2013-12-01

官方联系方式

客服手机:17625900360   
2:不支持迅雷下载,请使用浏览器下载   
3:不支持QQ浏览器下载,请用其他浏览器   
4:下载后的文档和图纸-无水印   
5:文档经过压缩,下载后原文更清晰   

精品推荐

相关阅读

人人文库
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服客服 - 联系我们

网站客服QQ:2846424093    人人文库上传用户QQ群:460291265   

[email protected] 2016-2018  renrendoc.com 网站版权所有   南天在线技术支持

经营许可证编号:苏ICP备12009002号-5