- 17
- 0
- 约6.2千字
- 约 7页
- 2018-10-09 发布于重庆
- 举报
c语言学生成绩管理系统数据结构课程设计报告课程设计
?
c语言学生成绩管理系统-数据结构课程设计报告-课程设计
c语言学生成绩管理 HYPERLINK /shejixiazai/ \t _blank 系统-数据结构 HYPERLINK / \t _blank 课程设计报告|数据结构 HYPERLINK / \t _blank 课程设计
要求是这样的1、用c语言编写一个简单的学生信息管理程序,能实现对学生信息的简单管理。2、具体要求:建立一个4个学生的信息登记表,每个学生的信息包括:学号,姓名,和3门 HYPERLINK / \t _blank 课程的成绩(FOX,C,ENGLISH)。?????? 程序运行时显示一个简单的菜单,例如:?? (1):信息输入(INPUT)?? (2):总分统计(COUNT)?? (3):总分排序(SORT)?? (4): HYPERLINK /chaxun/index.html \t _blank 查询(QUERY)???? 其中:???? (1):对4个学生的信息进行输入;???? (2):对每个学生的3门 HYPERLINK / \t _blank 课程统计总分;????? (3):对4个学生的总分按降序排序并显示出来;????? (4): HYPERLINK /chaxun/index.html \t _blank 查询输入一个学号后,显示出该学生的有关信息;............偶先写了个...#i ncludeiostream.h#i ncludestdlib.hstruct student{?int num;??? char name[20];?int foxscore;?int cscore;?int englishscore;??? struct student *next;};
void menu(){?cout??????? welecome to my student grade management systemendl;?cout? please follow everyone step in the menuendl;?cout??? 1.input informationendl;?cout??? 2.total scoresendl;?cout??? 3.sortendl;?cout??? 4.queryendl;?cout??? ***************************************************endl;}
struct student *creat(struct student *head) // 函数返回的是与节点相同类型的指针{??? struct student *p1,*p2;??? p1=p2=(struct student*) malloc(sizeof(struct student)); // 申请新节点??? cinp1-nump1-namep1-foxscorep1-cscorep1-englishscore; // 输入节点的值?? ?p1- next = NULL; // 将新节点的指针置为空??? while(p1-num0)??? {??????? if (head==NULL) head=p1; //空表,接入表头??????? else p2-next=p1; // 非空表,接到表尾??????? p2 = p1;??????? p1=(struct student *)malloc(sizeof(struct student)); //申请下一个新节点??cinp1-nump1-namep1-foxscorep1-cscorep1-englishscore; ?//输入节点的值??? }??? return head; //返回链表的头指针}
?
void count(struct student *head){?struct student *temp;?temp=head; //取得链表的头指针?while(temp!==NULL)?{??int m;??m=temp-foxscore+temp-cscore+temp-englishscore;??????? ?coutmendl;//输出链表节点的值??????? ?temp=temp-next; //跟踪链表增长?}
}void sort(struct student *head){?struct student *tp;?tp=head;?int a;//定义总分数组?int i,j,k;?while(temp!==NULL)?{?a[i
您可能关注的文档
- BR PCC 在大型注塑机控制系统中的应用.doc
- brand name论文Functional Equivalence in the Translation of Brand Names.doc
- BP神经网络在物流预测中的应用汇总.docx
- Brief Analysis on the North East Asia Policy of Japan's Democratic Party.doc
- Britax双面骑士为婴幼儿量身定制的汽车安全座椅.docx
- BSOKXE企业财务管理论文会计制度论文低碳经济下绿色财务管理初探.doc
- BS构架的汽轮机组状态监测与故障诊断系统的研究及实施.doc
- BS爱心助学活动策划.doc
- btfjss会计研究类论文会计在经济建设中的地位和作用的研究.doc
- BT投标书组建的项目公司及其机构和管理组织结构.doc
原创力文档

文档评论(0)