#include #include
学生学籍管理C源代码

学生学籍管理C源代码

ID:37742349

大小:80.50 KB

页数:12页

时间:2019-05-30

学生学籍管理C源代码_第1页
学生学籍管理C源代码_第2页
学生学籍管理C源代码_第3页
学生学籍管理C源代码_第4页
学生学籍管理C源代码_第5页
资源描述:

《学生学籍管理C源代码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、/*应包含的头文件:*///1.cpp:Definestheentrypointfortheconsoleapplication.//#include"StdAfx.h"#include#include#include#include#include/*数据结构:(结构体设计)*/typedefstruct{intyear;intmonth;intday;}DATE;/*学生成绩情况*/pintstudent(floatm){if(m>=85)return(1

2、);if(m>=60)return(2);elsereturn(3);}typedefstruct{charflag;intnumber;charname[11];charsex;DATEbirthday;charspeciality[21];charClassName[14];floatAverageGrade;charAddress[20];charphone[11];}STUDENT;/*学生信息显示函数*/voiddisplay(STUDENT*pst){intn;intdt;printf("============================

3、======================");printf("学号:%d",pst->number);printf("姓名:%s",pst->name);if(pst->sex=='M')printf("性别:男");elseprintf("性别:女");dt=pst->birthday.year*10000;dt+=pst->birthday.month*100;dt+=pst->birthday.day;printf("出生日期:%d",dt);printf("所学专业:%s",pst->speciality);prin

4、tf("所在班级:%s",pst->ClassName);printf("平均成绩:%.2f",pst->AverageGrade);printf("家庭地址:%s",pst->Address);printf("电话号码:%s",pst->phone);n=pintstudent(pst->AverageGrade);if(n==1)printf("成绩情况:优秀");elseif(n==2)printf("成绩情况:良好");elseprintf("成绩情况:不及格");printf("====================

5、==============================");}/*主函数*/intmain(intargc,char*argv[]){charch;voidAddStudent(),QueryStudent();voidUpdateStudent(),DeleteStudent();voidRestoreStudent(),Studentname();voiddisplaystudent(),Leijiaqi();do{system("cls");printf("***************学生学籍管理系统***************")

6、;printf("1.添加学生信息");printf("2.按学号查询学生信息");printf("3.按姓名查询学生信息");printf("4.修改学生信息");printf("5.删除学生信息");printf("6.恢复删除信息");printf("7.显示学生信息");printf("8.统计优秀、及格、不及格人数");printf("0.推出");printf("==================================================");printf("请选择:");ch=g

7、etch();printf("%c",ch);switch(ch){case'1':AddStudent();break;case'2':QueryStudent();break;case'3':Studentname();break;case'4':UpdateStudent();break;case'5':DeleteStudent()break;case'6':RestoreStudent();break;case'7':displaystudent();case'8':Leijiaqi();break;case'0':exit(0);}}while

8、(1);return0;}/*添加学生信息处理函数:*/voidA

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。