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

加入VIP,免费下载
 

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

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

下载须知

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

版权提示 | 免责声明

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

C语言课程设计报告选课管理系统.docx

1、C语言课程设计报告选课管理系统课程设计题目:选课管理系统 1选课管理系统要求:学生选课信息的添加(学生选课信息包括学生学号、课程名称、学分)学生选课信息的删除学生选课信息查询(查询每个学生的选课信息,每个学生选课的总学分,选具体某门课程(课程名输入)的学生名单)2实现思路 个人信息用结构体定义,解决的方案可以用结构体数组,或是链表作为临时数据处理,用文件来存储数据。注意数据定义的数据类型,用函数实现相应的功能,然后在主程序中调用,程序运行的时候用菜单选择功能,然后进行相关操作。1-选课信息的添加- 2-选课信息的删除- 3-选课信息的修改- 4-选课信息的查询- 5-从文件读入学生信息-6-删

2、除文件中学生信息-7-保存学生信息-8-退出-3实验总结(分析程序的得与失)这个课题是设计一个成绩管理系统,该系统能够较好的管理好学生的成绩,也拥有比较完善的功能。 在编写过程中,我逐步的了解了程序模块化设计的思想含义。在整个程序设计的过程中语法的错误还是比较容易检查的,但是对于那些逻辑思维的问题方面的缺陷不易查出,因此常常出现系统提示没有错误但是仍然不能够正常运行的境况,尽管有很多不足之处,但我在整个系统程序设计的过程中,我可以感受到自己对C语言有了一定的掌握,对整体的把握度也提高了很多。4心得体会通过这周的编程我发现了自己的一些不足,在编写时经常犯一些低级错误,由于自己的马虎而浪费了不少时

3、间。在不知如何进行的时候有一种不自信,总想别人正在做什么,这些不足既然被发现就得在以后的做事中注意,争取改掉。经过一周的努力我掌握了一些基本的C语言进行程序设计的技巧,更深的理解和运用结构化程序设计的思想和方法,掌握开发一个小型实用系统的基本方法,同时学会了一些调试一个较长程序的基本方法,提高了书写程序设计开发文档的能力(书写课程设计报告)。这一周的实践让我受益匪浅,在此我要感谢孜孜不倦指导我们的老师,感谢在我困惑时给我帮助的同学,感谢学校给我们一个这样动手动脑的机会,使我们在理论与实践相结合方面又得到了一次很好的锻炼,让我们得到很大的收获。程序的源代码#include #include #i

4、nclude #include #define M 1000 void insert(); void del(); void average(); void find(); void save(); void read(); void del_file(); void modify(); int now_no=0; struct student int no; char name20; float score1; float score2; float score3; float sort; float ave; float sum; ; struct student stuM,*p; voi

5、d main() int as; char ch; do printf(t欢迎使用nnn);printf(ttt1.添加学生信息tt2.删除学生信息ttttn);printf(ttt3.修改学生信息tt4.查询学生信息ttttn);printf(ttt5.从文件读入学生信息t6.删除文件中学生信息ttttn);printf(ttt7.保存学生信息tt8.退出nn);printf(nnnntt选择功能选项(输入所选功能前的数字):); fflush(stdin); scanf(%d,&as); switch(as) case 1:system(cls); insert(); break; cas

6、e 2:system(cls); del(); break; case 3:system(cls); modify(); break; case 4:system(cls); find(); break; case 5:system(cls); read(); break; case 6:system(cls); del_file(); break; case 7:system(cls); save(); break; case 8:system(exit); exit(0); default:system(cls); while(1); void input() int i=0; char

7、ch; do printf(tttt1.录入学生信息n输入第%d个学生的信息n,i+1); printf(n输入2位的学生学号:); scanf(%u,&stui.no); fflush(stdin); printf(n输入学生姓名:); fflush(stdin); gets(stui.name); printf(n输入课程1学分:); scanf(%f,&stui.score1); printf(n输入课程2学分:); fflush(stdin); scanf(%f,&stui.score2); printf(n输入课程3学分:); fflush(stdin); scanf(%f,&stu

8、i.score3); printf(nn); i+; now_no=i; printf(是否继续输入?(Y/N); fflush(stdin); ch=getch(); system(cls); while(ch!=n&ch!=N); system(cls); void sort() struct student temp; int i,j; average(); for(i=1;inow_no;i+) for(j=1;j=now_no-i;j+) if(stuj-1.avestuj.ave) temp=stuj; stuj=stuj-1; stuj-1=temp; printf(排序已完成进

9、入功能2可进行显示n); system(pause); system(cls); void sort1() struct student temp; int i,j; for(i=1;inow_no;i+) for(j=1;j=now_no-i;j+) if(stuj-1.score1stuj.score1) temp=stuj; stuj=stuj-1; stuj-1=temp; void sort2() struct student temp; int i,j; for(i=1;inow_no;i+) for(j=1;j=now_no-i;j+) if(stuj-1.score2stuj.

10、score2) temp=stuj; stuj=stuj-1; stuj-1=temp; void sort3() struct student temp; int i,j; for(i=1;inow_no;i+) for(j=1;j=now_no-i;j+) if(stuj-1.score3stuj.score3) temp=stuj; stuj=stuj-1; stuj-1=temp; void display() int i; char as; average(); do printf(ttt班级学生信息列表n); printf(学号tt姓名t课程1学分 课程2学分 课程3学分 平均学分

11、n); for(i=0;inow_no&stui.name0;i+) printf(%utt%st%.2ft %.2ft%.2f %.2fn,stui.no,stui.name,stui.score1,stui.score2,stui.score3,stui.ave); printf(nnn按任意键返回主菜单); fflush(stdin); as=getch(); while(!as); system(cls); void display1() int i; char as; do printf(t学号t姓名t学分1n); sort1(); for(i=0;inow_no&stui.name

12、0;i+) printf(t%u%st%.2ftn,stui.no,stui.name,stui.score1); printf(t学号t姓名t学分2n); sort2(); for(i=0;inow_no&stui.name0;i+) printf(t%u%st%.2ftn,stui.no,stui.name,stui.score2); printf(t学号t姓名t学分3n); sort3(); for(i=0;inow_no&stui.name0;i+) printf(t%u%st%.2ftn,stui.no,stui.name,stui.score3); printf(ttt按任意键返回

13、主菜单); fflush(stdin); as=getch(); while(!as); system(cls); void insert() char ch; do printf(ntt输入插入学生信息n); printf(n输入学生学号:); scanf(%u,&stunow_no.no); fflush(stdin); printf(n输入学生姓名:); fflush(stdin); gets(stunow_no.name); printf(n输入课程1学分:); fflush(stdin); scanf(%f,&stunow_no.score1); printf(n输入课程2学分:);

14、 fflush(stdin); scanf(%f,&stunow_no.score2); printf(n输入课程3学分:); fflush(stdin); scanf(%f,&stunow_no.score3); printf(nn); now_no=now_no+1; sort(); printf(是否继续输入?(Y/N); fflush(stdin); ch=getch(); system(cls); while(ch!=n&ch!=N); void del() long inum; int i; printf(输入要删除学生的学号:); fflush(stdin); scanf(%u,

15、&inum); for(i=0;inow_no;i+) if(stui.no=inum) if(i=now_no)now_no-=1; else stui=stunow_no-1; now_no-=1; sort(); break; system(cls); void save() FILE *fp; int i; char filepath20; printf(输入要保存的文件路径:); fflush(stdin); gets(filepath); if(fp=fopen(filepath,w)=NULL) printf(n保存失败!); exit(0); for(i=0;inow_no;i

16、+) stui.sum=stui.score1+stui.score2+stui.score3; stui.ave=stui.sum/3; fprintf(fp,t%u%st%.2ft%.2ft%.2ft%.2fn,stui.no,stui.name,stui.score1,stui.score2,stui.score3,stui.ave); fclose(fp); printf(学生信息已保存在%s中!n,filepath); system(pause); system(cls); void find() int i; char str20,as; do printf(输入要查询的学生姓名:

17、); fflush(stdin); gets(str); for(i=0;inow_no;i+) if(!strcmp(stui.name,str) printf(t学号tt姓名t课程1学分t课程2学分t课程3学分t平均学分n); printf(t%ut%st%.2ft%.2ft%.2ft%.2fn,stui.no,stui.name,stui.score1,stui.score2,stui.score3,stui.ave); printf(ttt按任意键返回主菜单); fflush(stdin); as=getch(); while(!as); system(cls); void avera

18、ge() int i; for(i=0;inow_no;i+) stui.sum=stui.score1+stui.score2+stui.score3; stui.ave=stui.sum/3; void modify() int i; char str20; printf(输入要修改的学生姓名:); fflush(stdin); gets(str); for(i=0;inow_no;i+) if(!strcmp(stui.name,str) system(cls); printf(ntt输入修改后学生信息n); printf(n输入学生学号:); fflush(stdin); scanf(

19、%u,&stui.no); printf(n输入课程1学分:); fflush(stdin); scanf(%f,&stui.score1); printf(n输入课程2学分:); fflush(stdin); scanf(%f,&stui.score2); printf(n输入课程3学分:); fflush(stdin); scanf(%f,&stui.score3); printf(nn); sort(); break; system(cls); void read() FILE *fp; int i; char filepath20; printf(输入要读入的文件路径:); fflus

20、h(stdin); gets(filepath); if(fp=fopen(filepath,r)=NULL) printf(找不到%s文件!n,filepath); system(pause); exit(0); now_no=0; for(i=0;iM&!feof(fp);i+) fscanf(fp,t%dt%st%ft%ft%ft%fn,&stui.no,stui.name,&stui.score1,&stui.score2,&stui.score3,&stui.ave); now_no+; fclose(fp); printf(保存的在文件%s中的所有信息已经读入!n,filepath); system(pause); system(cls); void del_file() FILE *fp; char filepath20; printf(输入要删除的文件路径:); fflush(stdin); gets(filepath); fp=fopen(filepath,w); fclose(fp); printf(保存的在文件%s中的所有信息已经删除!n,filepath); system(pause); system(cls);

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

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