#include<stdio.h>
#include<stdlib.h>
#include<malloc.h>
#define LEN sizeof(struct student)
struct student
{
int num;
float score;
struct student *next;
};
void main() //主函数
{
struct student *creat(void);//建立一个动态链表
struct student *del(struct student *head,int del_num);//删除链表
struct student *insert(struct student *head,struct student *stu);//插入链表
void print(struct student *head);//输出链表
struct student *head;
struct student *stu; //要插入的节点
int del_num;
head=creat(); //创建动态链表
print(head); //输出原链表
printf("\n"); //空一格
printf("Input the delete del_num:");
scanf("%d",&del_num);
while(del_num!=0) //多次删除
{
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余4页未读,立即下载