void fun4(kk* head1,kk *head2)/*刪除a 與b num相同 的節點*/
{
kk *p1,*p2;
p1=head1;
p2=head2;
while(p1->next!=NULL)
{
while(p1->num!=p2->num&&p2->next!=NULL)
p2=p2->next;
if(p1->num==p2->num)
head1=fun3(head1,p2);/*調用fun3()來刪除節點*/
p1=p1->next;
p2 = head2; //這裏p2循環到鏈表2末尾了,要提到head,進行新的循環
}
printf("The new chain a table is:\n");
fun2(head1);/*輸入刪除節點後的a 鏈表*/
}