C语言课设之学生学籍管理系统

上传人:工**** 文档编号:454805744 上传时间:2023-08-24 格式:DOC 页数:10 大小:73.50KB
返回 下载 相关 举报
C语言课设之学生学籍管理系统_第1页
第1页 / 共10页
C语言课设之学生学籍管理系统_第2页
第2页 / 共10页
C语言课设之学生学籍管理系统_第3页
第3页 / 共10页
C语言课设之学生学籍管理系统_第4页
第4页 / 共10页
C语言课设之学生学籍管理系统_第5页
第5页 / 共10页
点击查看更多>>
资源描述

《C语言课设之学生学籍管理系统》由会员分享,可在线阅读,更多相关《C语言课设之学生学籍管理系统(10页珍藏版)》请在金锄头文库上搜索。

1、题目:学生学籍管理系统目录:一. 个人简介。二. 报告摘要。三. 报告目录。四报告正文。1、系统需求分析2、系统总体设计3、系统详细设计 六总结。二.报告摘要这个C语言课程设计是关于学生学籍管理系统的设计,题目要求能够录入数据,查询, 删除和排序的功能。报告依次以主函数板块、数据录入板块、査询板块、删除板块、排序板 块的顺序进行。入数录 录函据询除序 目主数查删排 告 1 2 3 4 5报三四报告正文1系统需求分析根据题目需求,在程序中要求浏览学生的信息,应该提供数据录入、查询、删除、 排序的操作。题目要求实得成绩、实得学分根据条件自动运算,应该提供求综合成绩和实得 学分的算法,另外还应该提供

2、键盘式选择菜单实现功能选择。2系统总体设讣3系统详细设计(1)主函数负责提供输入、处理和输出部分的函数凋用,其中各功能模块用菜单方式选择。 程序:void menu()int n, w;doputs(tt*MENU*nn);puts(/zttttl.enter new data-student);puts(?,tttt2 search by name);puts(?,tttt3.search by learn number);puts(?,tttt 4. delete data);puts(/ztttt5 insert data?z);puts(/ztttt6.enter new data-s

3、orce,z);puts(?,tttt6 exit);puts (/znntt * * * * * * * *n);printf (choice your number (1-9) :bb);scanf&n);if(n9)wl=l;getchar 0:else wl=O;/while(wl=l);switch(n)case 1:enter 0;breakcase 2:search by name();break;case 3:search by learn number();break;case 4:del0:break;case 5:insert 0:break;case 6:exit(0)

4、;break;mainOmenu 0;(2)数据录入板块数据信息中学号、姓兔等是字符型,采用字符型数组,分数、号码、等为整数,可 以采用整型数组,实得学分可能为小数,采用实型。采用结构体数组存放学生数据信息到文 件。程序:/*/#define N 10struct studentint num;char name20;char sex;char tel 20;char domi3;stuN;viod enter new data-student 0int i, n;printf (z,hou many students (0-%d) ?:n-1);for (n=l;n10;n+)printf

5、(?,n enter data nownn); for(i=0;in;i+)printf (/zn input%dth student record n, i+1); input (i);if(i!=0) save (n);printf_back();#define N 10struct courseint num;int course_num;char coursename;int normalsorceint normal; 平时成绩int lab;实验成绩int text ;考试成绩int ture;综合成绩float act 口; 实得学分/couLNvoid enter new da

6、ta-sorce()int i, n, z, c;float s;printf (?/how many num(0-%d) ?: NT);for(n=l;n10;n+)printf (n enter data nownn,z);for(i=0;in;i 卄)print Cn input%dth record n, i+1);input (i);if(i!=0) save(n);printf_back();if(cou1 lab二二一1) cou1 true=cou1 normal*0. 3+cou-1 text*0.7; else cou1 true=cou-1lab*0 15+cou1 no

7、rmal*0. 15+cou1 text*0 7;if(c=100) s=cou1 normalsoree*l;else c=coutext/10;switch(c)case 10:case 9:s=cou1 normaIsorce*0. 9:break;case 8:s=cou1 normalsorce*0. 8;break;case 7:s=cou1 normalsorce*0. 75;break;case 6:s=cou1 normalsorce*0. 6;break;case 5:case 4:case 3:case 2:case 1:case 0:s=0;break;default:

8、printf(errorn);coui act=s;(3)数据查询这个模块要求a.输入一个学号或姓名査讯学生的基本信息并显示输出;输入一个宿 舍号码,可查出本室所有学生的基本信息并显示输出;c输入一个学号时,査出此学生所有 课程情况。程序:/*/Search () int i, n, k;Struct student s;Struct course c;n=load();dodo k=-l;printf(/?nnenter name that you want to search! name:);scanf (,z%sz s. name);printf _face0;do n=-l;Print

9、f(,?nnenter domi that you want to search! domi:)scanf s. domi);printf_ face0;do i=-l;printf (z/nnenter num that you want to search! num “);scanf (/z%d%c%d%fc. num, c. coursename, c ture, c. act);printf_face();(4)删除数据题目要求在删除A. TXT中一个学生信息时,B. TXT中相应的信息也要被删除。程序:/*/void del()struct student ssturct cours

10、e c;FILE*fp;int i, n, k wO=l, wl, w2=0;n=load();dok=-l;printf_face();for(i=0, in;i+)if(i!=0)&(i%10=0)printf (z,nnremember no. which needed delete Pass any key to contiune“);getchOputs(nn);printf_one(i);doprintf (,znnenter no. That you want to delete! no. );scanfs. num);for(i=0;i in, i+)if (strcmp(co

11、ui=stuEil)if (k=-l)printf Cnnno existIPlease again7*);while(k=-l);printf_face():printf_one(k);wl=delete_data(k, n);2)backif(wl=l)Printf (?/nsuccessful ! nnare you delete another ?nntl) yes with savetbb?,);scanf (,z%d?z, &w0);w2=l;elsewO二0;if(w2=l)stuk=sif (w0!=l&w2=l)save(n);while(wO=l);menuO(5)数据排序

12、 能实现选择按综合成绩或实得学分升序或降序排序并显示数据。程序:/*/ void order()(int i, j, k;int m, n, p;struct course s;struct course c;for(i=0;i9;i+)k=i;for (j=i+l:jcouk true) k=j;s=coui true;couli true=couj. true;couLj true=s;for(m=0;m9;m+)p=mfor(n=m+l;ncou. Actp)p=n;c= cou. act m; cou. act m =cou. ate n; cou. act n_ =c;(6)公共函数/*voidprintf.facelO /每次要输岀文件1数据的时候用到(打印到数据的第一排,提示作 用) printf(n 学号姓名性别宿舍号码电话号码n);/*void printf_face() /每次要输出文

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 活动策划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号