- 2
- 0
- 约5.37千字
- 约 6页
- 2017-10-18 发布于天津
- 举报
用链表处理学号成绩(参考程序).doc
//用链表处理学号成绩
#includeiostream.h
struct student //定义结构体
{ long num;
int score;
student *next;
};
student *creat(); //建立链表
void print(student *head); //输出链表
student *insert(student *head,student *stud);//插入节点
student *del(student *head,long num);//删除节点
void main()
{ student *head=NULL,*stud;
long num;int score;
cout 建立学号、成绩:endl;
head=creat();
cout建立成绩链表后的学号、成绩endl;
print(head);
cout输入插入的学号(0或负数结束):;cinnum;
while(num0)
{ cout成绩:;cinscore;
stud=new student;
stud-num=num;
stud-score=score;
head=insert(head,stud);
cout输入插入的学号(0或负数结束):;cin
您可能关注的文档
最近下载
- 2025年江西国科军工集团股份有限公司招聘7人 (第一批)备考试题及答案解析.docx VIP
- 福建省漳州地区2024-2025学年八年级下学期期中考试数学试卷(含解析).pdf VIP
- SONY索尼HXRNX80说明书NX80操作手册.pdf VIP
- 2026年四川省宜宾市中小学体育老师招聘考试参考试题及答案解析.docx VIP
- DVP-EH3 使用说明.pdf VIP
- 金冶炼厂的自动化与信息化建设考核试卷.docx VIP
- 【真题】2025年广东初中生物会考试题及答案 .pdf VIP
- 中国人寿创业签约培训.pptx VIP
- 2025湖州市产业投资发展集团有限公司招聘笔试参考题库附答案详解.docx VIP
- 2026年广东省东莞市中考化学模试卷(含答案解析).doc VIP
原创力文档

文档评论(0)