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

当前位置:首页 > 大学C++课程设计报告--学生成绩管理系统(附源代码)

大学C++课程设计报告--学生成绩管理系统(附源代码)

  • 62 次阅读
  • 3 次下载
  • 2025/12/10 19:08:40

//定义i=1,当找到数据时把i置为0.用于输出没有找到数据 int i=1;

if(!(curnode=head->next)) { cout<<\┏━━━━━━━┓\ cout<<\┃!这是一个空表!┃\ cout<<\┗━━━━━━━┛\ curnode=p; cout<<\ return; }

while(curnode!=NULL) { switch(n) { case 1: b=curnode->number==str;break; case 2: b=curnode->name==str;break; default: return; } if(b) { i=0; pw->next=curnode->next; delete curnode; curnode=pw->next; } else { pw=curnode; curnode=curnode->next; } }

//当i=1是代表没有找到数据 if(i) { cout<<\┏━━━━━━━┓\ cout<<\┃没有匹配的数据┃\ cout<<\┗━━━━━━━┛\} else { cout<<\┏━━━━━━━┓\ cout<<\┃ 数据删除成功 ┃\ cout<<\┗━━━━━━━┛\

} curnode=head; while(curnode->next) { curnode=curnode->next; } cout<<\}

//////////////////////////////////////排序函数的实现 void student::compositor(int n,int m) { if(head->next==NULL) { cout<<\┏━━━━━━━━━━━┓\ cout<<\┃!这是一个空表不能排序!┃\ cout<<\┗━━━━━━━━━━━┛\ cout<<\ return; } if(head->next->next==NULL) { cout<<\┏━━━━━━━━━━━┓\ cout<<\┃!只有一条记录不用排序!┃\ cout<<\┗━━━━━━━━━━━┛\ cout<<\ return; } student *s,*p,*q,*r; r=head;

s=head->next; q=s;

p=q->next;

while(s!=NULL) { while(p!=NULL) { switch(n) { case 1: { if(m==1) { while(s->numbernumber)

} case 2: {

{

q->next=p->next; r->next=p; p->next=s; s=p; p=q->next; if(p==NULL) break; } } else { while(s->number>p->number) { q->next=p->next; r->next=p; p->next=s; s=p; p=q->next; if(p==NULL) break; } }

break;

if(m==1) { while(s->sumsum) { q->next=p->next; r->next=p; p->next=s; s=p; p=q->next; if(p==NULL) break; } } else { while(s->sum>p->sum) {

q->next=p->next; r->next=p; p->next=s; s=p; p=q->next; if(p==NULL) break; } } break; } case 3: { if(m==1) { while(s->aveave) { q->next=p->next; r->next=p; p->next=s; s=p; p=q->next; if(p==NULL) break; } } else { while(s->ave>p->ave) { q->next=p->next; r->next=p; p->next=s; s=p; p=q->next; if(p==NULL) break; } } break; } default: return; }

if(p==NULL)

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

//定义i=1,当找到数据时把i置为0.用于输出没有找到数据 int i=1; if(!(curnode=head->next)) { cout<<\┏━━━━━━━┓\ cout<<\┃!这是一个空表!┃\ cout<<\┗━━━━━━━┛\ curnode=p; cout<<\ return; } while(curnode!=NULL) { switch(n) { case 1: b=curnode->number==str;break; case 2: b=curnode->name==str;break; default: return; } if(b) { i=0; pw->next=curnode->next; del

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价: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