文件名称:CPP
介绍说明--下载内容均来自于网络,请自行研究使用
10.编写一个程序,从键盘输入一批学生的成绩信息,每个学生的成绩信息包括:学号、姓名以及8门课的成绩。然后按照平均成绩由高到低顺序输出学生的学号、姓名以及平均成绩。
11.把在链表中插入一个新结点的操作写成一个函数:
bool insert(Node *&h,int a,int pos)
其中,h为表头指针,a为要插入的结点的值,pos(≥0)表示插入位置。当pos为0时表示在表头插入;否则,表示在第pos个结点的后面插入。操作成功返回true,否则返回false。
12.把在链表中删除一个结点的操作写成一个函数:
bool remove(Node *&h,int &a, int pos)
其中,h为表头指针,a用于存放删除的结点的值,pos(>0)表示删除结点的位置。操作成功返回true,否则返回false。
13.编写一个程序,首先建立两个集合(从键盘输入集合的元素),然后计算这两个集合的交集、并集以及差集,最后输出计算结果。要求用链表实现集合的表示。
14.名表查找中折半查找的递归函数。-10. Write a program, enter the number of student achievement information the keyboard, each student achievement information includes: Student ID, name, and 8 units results. Then according to the average score of students in descending order of the output number, name and grade point average. 11. The insert a new node in the linked list operation is written as a function: bool insert (Node* & h, int a, int pos) wherein, h is the header pointer, a is the node you want to insert a value, pos (≥0) indicates insertion position. When pos 0 are shown in the table header insert otherwise, indicating that after the first pos-node insertion. Operation successful return true, otherwise returns false. 12. to delete a node in the linked list operation is written as a function: bool remove (Node* & h, int & a, int pos) wherein, h is table pointer, a used to store deleted node value, pos (> 0) indicates the position of deleted nodes. Operation successful return true, otherwise re
11.把在链表中插入一个新结点的操作写成一个函数:
bool insert(Node *&h,int a,int pos)
其中,h为表头指针,a为要插入的结点的值,pos(≥0)表示插入位置。当pos为0时表示在表头插入;否则,表示在第pos个结点的后面插入。操作成功返回true,否则返回false。
12.把在链表中删除一个结点的操作写成一个函数:
bool remove(Node *&h,int &a, int pos)
其中,h为表头指针,a用于存放删除的结点的值,pos(>0)表示删除结点的位置。操作成功返回true,否则返回false。
13.编写一个程序,首先建立两个集合(从键盘输入集合的元素),然后计算这两个集合的交集、并集以及差集,最后输出计算结果。要求用链表实现集合的表示。
14.名表查找中折半查找的递归函数。-10. Write a program, enter the number of student achievement information the keyboard, each student achievement information includes: Student ID, name, and 8 units results. Then according to the average score of students in descending order of the output number, name and grade point average. 11. The insert a new node in the linked list operation is written as a function: bool insert (Node* & h, int a, int pos) wherein, h is the header pointer, a is the node you want to insert a value, pos (≥0) indicates insertion position. When pos 0 are shown in the table header insert otherwise, indicating that after the first pos-node insertion. Operation successful return true, otherwise returns false. 12. to delete a node in the linked list operation is written as a function: bool remove (Node* & h, int & a, int pos) wherein, h is table pointer, a used to store deleted node value, pos (> 0) indicates the position of deleted nodes. Operation successful return true, otherwise re
(系统自动生成,下载前可以参看下载内容)
下载文件列表
12.cpp
13.cpp
14.cpp
10.cpp
11.cpp