# include & ltmalloc.h & gt
# Define NULL 0
#define LEN sizeof (structural student)
Structural students
{ long num
Int score; Structural students * next;
};
int n;
struct student *creat()
{structural students * head;
struct student *p 1,* p2
n = 0;
P 1=p2= (structural student *) malloc (len);
scanf("%ld,%d ",& ampp 1->; Number & amp1->; Score);
head = NULL
while(p 1->; num! =0)
{ n = n+ 1;
if(n = = 1)head = p 1;
Otherwise p2-& gt;; next = p 1;
p2 = p 1;
P 1= (structural student *) malloc (len);
scanf("%ld,%d ",& ampp 1->; Number & amp1->; Score);
}
p2->; next = NULL
Return (head);
}
Invalid Print (Structure Student * Head)
{ struct student * p;
Printf(" \n nNow, these %d records are: \ n ",n);
P = head;
If (head! = empty)
do
{ printf("%ld %d\n ",p-& gt; Num, p- > score);
p = p-& gt; Next;
}while(p! = NULL);
}
Structure student *del (structure student *head, long num)
{ struct student *p 1,* p2
if(head = = NULL){ printf(" \ n list NULL! \ n "); Go to the end; }
P 1 = head;
And (num! = p 1->; Number & AMPP1->; Au Suivant! = empty)
{ p2 = p 1; p 1 = p 1->; Next; }
if(num = = p 1->; Numbers)
{ if(p 1 = = head)head = p 1-& gt; Next;
Otherwise p2-& gt;; next = p 1->; Next;
printf("delete:%ld\n ",num);
n = n- 1;
}
Else printf("%ld not found! \n ",No.);
End:
Return (head);
}
struct student * insert(struct student * head,struct student *stud)
{ struct student *p0,*p 1,* p2
P 1 = head;
P0 = stud;
if(head==NULL)
{ head = p0P0->; next = NULL}
other
{
Give you this similar, this is what I did before, and it is also the homework assigned by the teacher ~!
It also took a long time. The point is, what you write must be debugged before it can be completed correctly ~
So write slowly by yourself ~!
You can't ask others to write you one that fully meets your requirements! Unless he writes the same paper as you ~! Haha ~!
Sorry ~ 1 can't write you'!