云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 学生管理系统

学生管理系统

  • 62 次阅读
  • 3 次下载
  • 2025/5/2 20:43:38

void leave();

//数据录入

void luru(grade *gra) {string str;

cout<<\请输入学生的学号,\ cin>>str;

gra->xuehao=str; cout<<\请录入该生课程编号\ cin>>gra->courseno; cout<<\请录入该生课程名称\ cin>>gra->coursename;

cout<<\请录入该生学分\ cin>>gra->xuefen;

cout<<\请录入该生平时成绩\ cin>>gra->pingshi;

cout<<\请录入该生实验成绩\ cin>>gra->shiyan;

cout<<\请录入该生卷面成绩\ cin>>gra->juanmian; //综合成绩计算 if(gra->shiyan==-1) gra->zonghe=gra->pingshi*0.3+gra->juanmian*0.7; else

gra->zonghe=gra->pingshi*0.15+gra->juanmian*0.7+gra->shiyan*0.15; //实得学分的计算 if(gra->zonghe>=90&&gra->zonghe<=100) gra->shide=gra->xuefen; else if(gra->zonghe>=80)

gra->shide=gra->xuefen*0.8; else if(gra->zonghe>=70)

gra->shide=gra->xuefen*0.75; else if(gra->zonghe>=60)

gra->shide=gra->xuefen*0.60; else if(gra->zonghe<60) gra->shide=0; else cout<<\您输入有误,请按提示操作!\ }

//查询功能

void lookfor(student *p,grade *head) {char i,k;

11

string str; int j,x=0; float sum=0;

cout<<\

cout<<\ A:学生基本情况查询 B:成绩查询 --\ cout<<\ cin>>i; switch(i)

{//学生基本情况查询

case 'A':cout<<\ cout<<\输入一个学号或姓名 2.输入一个宿舍号码 --\ cout<<\ cin>>j; //A1----输入一个学号或姓名(可实现选择),查出此生的基本信息并显示输出。 if(j==1) { cout<<\ cout<<\按学号查找 b 按姓名查找************\ cout<<\ cin>>k; if(k=='a') {cout<<\请输入学号:\ cin>>str; for( j=1;j<8;j++) {if(p[j].xuehao==str)

cout<

cout<>str; for( j=1;j<8;j++) {if(p[j].name==str)

cout<

cout<

12

cin>>str; for( j=1;j<8;j++) {if(p[j].sushe==str)

cout<

cout<

cout<<\请输入要查询学生的学号:\ cin>>str; for(j=1;j<8;j++) {if(p[j].xuehao==str) cout<<\学号:\姓名:\ }

head=head->next;//指向首元结点 while(head!=NULL) { if(head->xuehao==str) {cout<<\课程编号:\ <<\课程名称:\ <<\综合成绩:\ <<\实得学分:\ x++; sum=sum+head->shide; } head=head->next; //指针后指 } cout<<\共修:\科,实得总学分为:\ break;

default:cout<<\您输入有误,请按提示操作!\ } }

//删除功能

void del(student *stu,grade *head) {string str;

13 grade *p=head->next; grade *q;

cout<<\请输入要删除学生的学号:\ cin>>str;

//在学生基本信息中删除

for(int i=1;stu[i].xuehao!=\ { if(stu[i].xuehao==str) { for(int j=i;stu[j].xuehao!=\ {stu[j].gender=stu[j+1].gender; stu[j].name=stu[j+1].name; stu[j].sushe=stu[j+1].sushe; stu[j].tel=stu[j+1].tel; stu[j].xuehao=stu[j+1].xuehao; } stu[j].gender=\ stu[j].name=\ stu[j].sushe=\ stu[j].tel=\ stu[j].xuehao=\ } }

//在学生成绩基本信息中删除 while(p) { if(p->xuehao==str) {head->next=p->next; q=p; p=p->next; delete q; } else {p=p->next; head=head->next; } }

cout<<\删除成功!\ }

14

搜索更多关于: 学生管理系统 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

void leave(); //数据录入 void luru(grade *gra) {string str; cout<>str; gra->xuehao=str; cout<>gra->courseno; cout<>gra->coursename; cout<>gra->xuefen; cout<>gra->pingshi; cout<<\请录入该生实验成绩\

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com