会员注册 | 登录 | 微信快捷登录 QQ登录 微博登录 | 帮助中心 人人文库renrendoc.com美如初恋!
站内搜索 百度文库

热门搜索: 直缝焊接机 矿井提升机 循环球式转向器图纸 机器人手爪发展史 管道机器人dwg 动平衡试验台设计

   首页 人人文库网 > 资源分类 > DOC文档下载

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

  • 资源星级:
  • 资源大小:112.50KB   全文页数:17页
  • 资源格式: DOC        下载权限:注册会员/VIP会员
您还没有登陆,请先登录。登陆后即可下载此文档。
  合作网站登录: 微信快捷登录 支付宝快捷登录   QQ登录   微博登录
友情提示
2:本站资源不支持迅雷下载,请使用浏览器直接下载(不支持QQ浏览器)
3:本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰   

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

学生学习成绩管理系统用于对学生学习成绩数据文件的新文件创建和老文件管理,并可以进行密码设置。具体要求实现的功能如下1、输入/添加记录将每一个学生的学号、姓名和各科学习成绩作为一个记录进行输入或添加。要求经过密码验证后能建立一个新的数据文件或给已建立好的数据文件增加记录。2、显示、查询记录能按学生姓名(或学号)显示、查询一个或多个学生的各门(或某门)功课的成绩和平均成绩。3、修改记录可以对数据文件中的任意记录的数据进行修改,在修改前后对该记录的内容进行显示,并设确认提示。(要求设置密码,验证通过后方可进入修改环节)4、删除记录可以删除数据文件中的任一记录,包括逻辑删除(具有恢复功能)和物理删除(不可恢复)。(说明该功能也应设置为经过验证密码后才可实施删除)5、成绩排序采用不同的排序方法对单科成绩和总(或平均)成绩进行排序,但不能改变原记录的顺序。6、统计功能(A)计算各门课程全班总成绩及平均成绩(B)统计各门课程得分为100、9099、8089、7079、6069和不及格学生的人数,以及与全班总人数的百分比。7、其他该软件应具有系统名称、设计单位或个人等基本信息。学生成绩管理系统源程序清单includeincludeincludeincludedefineNULL0defineLENsizeofstudentdefineN5typedefstructstu{intflaglongnumcharname10intscoreNstructstunext}studentvoidedit/编辑菜单/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/关于/intncharcipher11{}/字符串,保存密码/main{charcstudentheadNULLsystemclsaboutfor{systemclsprintf\nprintf\t\tWelcometo\nprintf\n\t\tThestudentscoremanagesystem\nprintfMENU\nprintf\t\t\t1.Creattherecord\nprintf\t\t\t2.Loadthefile\nprintf\t\t\t3.Edittherecord\nprintf\t\t\t4.Aboutdesign\nprintf\t\t\t5.Quit\nprintf\nprintf\n\t\t\tEnteryourchoice15for{cgetcharifc\ncontinueelseifc5printf\t\t\tEnteryourchoice15elsebreak}getcharswitchc{case1headcreatifheadNULL{printfEmptyrecord\n\nEnteranykeytocontinue...\ngetchbreak}set_up_cipherprintfEnteranykeytoeditmenu...getcheditheadbreakcase2headloadifheadNULL{printf\nEnteranykeytocontinue...getchbreak}printfEnteranykeytoeditmenu...getcheditheadbreakcase3editheadbreakcase4aboutbreakcase5exit0}}}voideditstudenthead/编辑菜单/{charc,minti,f0for{systemclsprintfEDITMENU\nprintf\t\t\t1.Savetherecord.\nprintf\t\t\t2.Insertarecord.\nprintf\t\t\t3.Deletearecord.\nprintf\t\t\t4.Recovertherecord.\nprintf\t\t\t5.Revisetherecord.\nprintf\t\t\t6.Searchrecords.\nprintf\t\t\t7.Sorttherecords.\nprintf\t\t\t8.Tongjitherecords.\nprintf\t\t\t9.Changethepassword.\nprintf\t\t\t0.Returntomainmenu.\nprintf\nprintf\t\t\tEnteryourchoice09for{cgetcharifc\ncontinueelseifc9printf\t\t\tEnteryourchoice09elsebreak}switchc{case1saveheadf0breakcase2printfPleaseentertherightpassword\nifcipher_check0{printfWrongpassword\nbreak}headinsertheadf1breakcase3printfPleaseentertherightpassword\nifcipher_check0{printfWrongpassword\nbreak}headdeleteheadf1breakcase4printfPleaseentertherightpassword\nifcipher_check0{printfWrongpassword\nbreak}recoverheadf1breakcase5printfPleaseentertherightpassword\nifcipher_check0{printfWrongpassword\nbreak}reviseheadf1breakcase6searchheadbreakcase7printfSortonwhichsubject\nprintfscore11/score22/score33/sum4\nfor{scanfc,mifm\nelseifm1mnumheadNULLwhilep1num0{nenter_recordp1ifn1headp1elsep2nextp1p2p1p1studentmallocLENprintfPleaseenternextnumber0toend\nscanfld,p1num}ifn0p2nextNULLfreep1returnhead}studentinsertstudenthead/插入结点/{studentp1,p2,new_nodefor{new_nodestudentmallocLENifnew_nodeNULL{printfDatabaseisfull,cantaddmorerecord.\nreturnNULL}printf\nPleaseenterthenumberyouwanttoinsert\nenter0toendscanfld,new_nodenumifnew_nodenum0{break}forp1head,p2NULLp1NULLnew_nodenump1nump2p1,p1p1nextifp1NULLp1numnew_nodenump1flag1{charcprintfThisnumberalreadyexists\nprint_titleprintp1printfCoverornoty/nfor{cgetcharifcn||cN{freenew_nodebreak}elseifcy||cY{freenew_nodeenter_recordp1break}elseifc\nprintfErrorenteragainelsecontinue}}elseifp1NULLp1numnew_nodenum{nfreenew_nodeenter_recordp1}else{nenter_recordnew_nodenew_nodenextp1ifp2NULLheadnew_nodeelsep2nextnew_node}}returnhead}studentdeletestudenthead/删除结点/{longnumbercharcstudentp1,p2for{printfPleaseenterthenumberyouwanttodeleteenter0toend\nscanfld,numberifnumberbreakforp1head,p2NULLp1NULLp1numnumberp2p1,p1p1nextifp1NULL||p1flag0{printfthisnumberdoesntexist.\n}else{print_titleprintp1printfdeletethisrecord\nprintfsures/canclec/deletethoroughlyt\nfor{cgetcharifcc||cCbreakelseifcs||cS||ct||cT{nifcs||cSp1flag0else{ifp2NULLheadp1nextelsep2nextp1nextfreep1}break}elseifc\nprintferrorenteragain}}}returnhead}voidrecoverstudenthead/恢复删除/{studentplongnumberprintfrecoverwhichnumber\nscanfld,numberifnumber0returnpsearch_numberhead,numberifpNULLprintfCantrecoverthisnumber\nelseifpflag1printfThisnumberhasnotbeendeleted.\nelse{npflag1printfRecoversuccess\n}}voidrevisestudenthead/修改记录/{charclongnumberstudentp1for{printfWhichnumberdoyouwanttorevise\nenter0toendscanfld,numberifnumber0returnp1search_numberhead,numberifp1NULL||p1flag0{printfthisnumberdoesntexist.\ncontinue}print_titleprintp1printfDoyouwanttorevisetherecordy/n\nfor{cgetcharifc\ncontinueelseifcn||cNbreakelseifcy||cY{printfpleaseenternewrecord\nenter_recordp1printfthenewrecordis\nprint_titleprintp1break}elseprintferror,enteragain}}}voidsearchstudenthead/查找函数/{charcinti,min,maxlongnumberstudentpprintfPleaseentersearchconditions\nprintfalla/numbern/namem/scores/returnr\nfor{cgetcharifc\ncontinueelseifcs

注意事项

本文(学生成绩管理系统C语言代码.doc)为本站会员(21ask)主动上传,人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知人人文库网([email protected]),我们立即给予删除!

温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。

copyright@ 2015-2017 人人文库网网站版权所有
苏ICP备12009002号-5