ImageVerifierCode 换一换
格式:DOCX , 页数:20 ,大小:18.78KB ,
资源ID:7001828      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/7001828.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(C语言程序设计基于链表的学生成绩管理系统.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

C语言程序设计基于链表的学生成绩管理系统.docx

1、C语言程序设计基于链表的学生成绩管理系统华北科技学院计算机系综合性实验实验报告课程名称C语言程序设计实验学期2011至2012学年第二学期学生所在系部计算机系年级2011专业班级计算机科学与技术B-111学生姓名学号任课教师实验成绩计算机系制实验报告须知1、 学生上交实验报告时,必须为打印稿(A4纸)。页面空间不够,可以顺延。2、 学生应该填写的内容包括:封面相关栏目、实验地点、时间、目的、设备环境、内容、结果及分析等。3、 教师应该填写的内容包括:实验成绩、教师评价等。4、 教师根据本课程的综合性实验指导单中实验内容的要求,评定学生的综合性实验成绩;要求在该课程期末考试前将实验报告交给任课教

2、师。综合性实验中,所涉及的程序,文档等在交实验报告前,拷贝给任课教师。任课教师统一刻录成光盘,与该课程的期末考试成绩一同上交到系里存档。5、 未尽事宜,请参考该课程的实验大纲和教学大纲。C语言程序设计课程综合性实验报告开课实验室:基础五2012年7月6日实验题目基于链表的学生成绩管理系统一、实验目的1、掌握链表的创建、遍历显示和清除;2、掌握链表数据的文件保存、读取;二、设备与环境微型计算机、VC+三、实验内容1、定义结构体,创建链表structxsnodeintxh;charxm15;intgs;intyy;intwl;structxsnode*next;2、根据以上链表结点结构,实现以下功

3、能a、学生学号、姓名、各门成绩的录入;b、链表数据显示及清除;c、链表数据的文件保存与读取;四、实验结果及分析1、运行结果主菜单数据显示2、源程序主函数voidmain() intxz=0;structxs*head;head=init();while(xz!=5) menu(); scanf(%d,&xz); switch(xz) case1: create(head); break; case2: print(head); break; case3: save(head); break; case4: read(head); break; case5: printf(n系统退出,拜拜!n)

4、; break; default: printf(n选择错误,请按任意键选择!n); getch(); break; fr(head);free(head);数据录入源代码voidcreate(structxs*hd) intxh,gs,yy,wl,i; charxm20; structxs*p; fr(hd); printf(n请输入学生个数:); scanf(%d,&num); for(i=0;ixh=xh; strcpy(p-xm,xm); p-gs=gs; p-yy=yy; p-wl=wl; p-next=hd-next; hd-next=p; printf(录入数据完毕,请按任意键继

5、续!n); getch();添加记录源代码 voidprint(structxs*hd) structxs*p; p=hd-next; if(p!=NULL) printf(n数据显示n); printf(*n); printf(学号姓名高数英语物理平均分n); printf(*n); while(p!=NULL) printf(%4d,p-xh); printf(%10s,p-xm); printf(%8d,p-gs); printf(%7d,p-yy); printf(%6d,p-wl); printf(%n,(p-wl+p-wl+p-wl)/; p=p-next; printf(*n);

6、 printf(链表显示完毕,请按任意键继续!n);getch(); else printf(n当前链表为空,请先读取文件或创建链表!n按任意键继续!n); 查询记录源代码voidmenu() system(cls); printf(*n); printf(*学生成绩管理系统*n); printf(*n); printf(*jb11-131宋洁2012-7-3*n); printf(*n); printf(*1-创建链表*n); printf(*2-数据显示*n); printf(*3-保存文件*n); printf(*4-读取文件*n); printf(*5-系统退出*n); printf(

7、*n); printf(请选择操作(1-5:); 源程序#include#include#include#includestructxs intxh; charxm20; intgs,yy,wl; structxs*next;intnum=0;structxs*init() structxs*hd; hd=(structxs*)malloc(sizeof(structxs); hd-next=NULL; returnhd;voidfr(structxs*hd) structxs*p;p=hd-next;while(hd-next!=NULL) p=hd-next; hd-next=p-next

8、; free(p); voidcreate(structxs*hd) intxh,gs,yy,wl,i; charxm20; structxs*p; fr(hd); printf(n请输入学生个数:); scanf(%d,&num); for(i=0;ixh=xh; strcpy(p-xm,xm); p-gs=gs; p-yy=yy; p-wl=wl; p-next=hd-next; hd-next=p; printf(录入数据完毕,请按任意键继续!n); getch(); voidsave(structxs*hd) if(hd-next!=NULL) structxs*p=hd-next;

9、inti; FILE*fp; fp=fopen(,w); fprintf(fp,%3dn,num); for(i=0;ixh,p-xm,p-gs,p-yy,p-wl); p=p-next; fclose(fp); printf(n保存文件完毕,请按任意键继续!n); getch(); else printf(n当前链表为空,不需要保存,请按任意键继续!n); getch(); voidread(structxs*hd) inti; structxs*p; FILE*fp; fr(hd); fp=fopen(,r); fscanf(fp,%3dn,&num); for(i=0;ixh,p-xm,

10、p-gs,p-yy,p-wl); p-next=hd-next; hd-next=p; fclose(fp); printf(n读取文件完毕,请按任意键继续!n); getch(); voidprint(structxs*hd) structxs*p; p=hd-next; if(p!=NULL) printf(n数据显示n); printf(*n); printf(学号姓名高数英语物理平均分n); printf(*n); while(p!=NULL) printf(%4d,p-xh); printf(%10s,p-xm); printf(%8d,p-gs); printf(%7d,p-yy)

11、; printf(%6d,p-wl); printf(%n,(p-wl+p-wl+p-wl)/; p=p-next; printf(*n); printf(链表显示完毕,请按任意键继续!n);getch(); else printf(n当前链表为空,请先读取文件或创建链表!n按任意键继续!n); voidmenu() system(cls); printf(*n); printf(*学生成绩管理系统*n); printf(*n); printf(*jb11-131宋洁2012-7-3*n); printf(*n); printf(*1-创建链表*n); printf(*2-数据显示*n); p

12、rintf(*3-保存文件*n); printf(*4-读取文件*n); printf(*5-系统退出*n); printf(*n); printf(请选择操作(1-5:); voidmain() intxz=0;structxs*head;head=init();while(xz!=5) menu(); scanf(%d,&xz); switch(xz) case1: create(head); break; case2: print(head); break; case3: save(head); break; case4: read(head); break; case5: printf

13、(n系统退出,拜拜!n); break; default: printf(n选择错误,请按任意键选择!n); getch(); break; fr(head);free(head);3、试验收获通过这次试验,我掌握了链表的创建、遍历显示和清除功能,掌握了链表数据的文件保存、读取,能够熟练的使用VC+,对C程序有了更深的了解。教师评价评定项目ABCD评定项目ABCD算法正确界面美观,布局合理程序结构合理操作熟练语法、语义正确解析完整实验结果正确文字流畅报告规范题解正确其他:评价教师签名:年月日代码:#include#include#include#includestructxs intxh; c

14、harxm20; intgs,yy,wl; structxs*next;intnum=0;structxs*init() structxs*hd; hd=(structxs*)malloc(sizeof(structxs); hd-next=NULL; returnhd;voidfr(structxs*hd) structxs*p;p=hd-next;while(hd-next!=NULL) p=hd-next; hd-next=p-next; free(p); voidcreate(structxs*hd) intxh,gs,yy,wl,i; charxm20; structxs*p; fr

15、(hd); printf(n请输入学生个数:); scanf(%d,&num); for(i=0;ixh=xh; strcpy(p-xm,xm); p-gs=gs; p-yy=yy; p-wl=wl; p-next=hd-next; hd-next=p; printf(录入数据完毕,请按任意键继续!n); getch(); voidsave(structxs*hd) if(hd-next!=NULL) structxs*p=hd-next; inti; FILE*fp; fp=fopen(,w); fprintf(fp,%3dn,num); for(i=0;ixh,p-xm,p-gs,p-yy

16、,p-wl); p=p-next; fclose(fp); printf(n保存文件完毕,请按任意键继续!n); getch(); else printf(n当前链表为空,不需要保存,请按任意键继续!n); getch(); voidread(structxs*hd) inti; structxs*p; FILE*fp; fr(hd); fp=fopen(,r); fscanf(fp,%3dn,&num); for(i=0;ixh,p-xm,p-gs,p-yy,p-wl); p-next=hd-next; hd-next=p; fclose(fp); printf(n读取文件完毕,请按任意键继

17、续!n); getch(); voidprint(structxs*hd) structxs*p; p=hd-next; if(p!=NULL) printf(n数据显示n); printf(*n); printf(学号姓名高数英语物理平均分n); printf(*n); while(p!=NULL) printf(%4d,p-xh); printf(%10s,p-xm); printf(%8d,p-gs); printf(%7d,p-yy); printf(%6d,p-wl); printf(%n,(p-wl+p-wl+p-wl)/; p=p-next; printf(*n); printf

18、(链表显示完毕,请按任意键继续!n);getch(); else printf(n当前链表为空,请先读取文件或创建链表!n按任意键继续!n); voidmenu() system(cls); printf(*n); printf(*学生成绩管理系统*n); printf(*n); printf(*jb11-131宋洁2012-7-3*n); printf(*n); printf(*1-创建链表*n); printf(*2-数据显示*n); printf(*3-保存文件*n); printf(*4-读取文件*n); printf(*5-系统退出*n); printf(*n); printf(请选

19、择操作(1-5:); voidmain() intxz=0;structxs*head;head=init();while(xz!=5) menu(); scanf(%d,&xz); switch(xz) case1: create(head); break; case2: print(head); break; case3: save(head); break; case4: read(head); break; case5: printf(n系统退出,拜拜!n); break; default: printf(n选择错误,请按任意键选择!n); getch(); break; fr(head);free(head);

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1