满足条件就删除,不满足就进入下一个节点
typedef struct LNode{
int data;
struct LNode *next;
}LNode, *LinkList;
/*链表*/
LinkList List_TailInsert(LinkList L) {
int x;
L = (LinkList)malloc(sizeof(LNode));
L->next = NULL;
LNode *s, *r = L;
cout << "尾插法创建单链表:";
while (true) {
cin >> x;
s = (LNode*)malloc(sizeof(LNode));
s->data = x;
r->next = s;
r = s;
if (cin.get() == '\n')break;
}
r->next = NULL;
return L;
}
void List_Print(LinkList L) {
LNode *p;
p = L->next;
while (p) {
cout << p->data << " ";
p = p->next;
}
cout << endl;
}
LinkList Del_aTob(LinkList L, int a, int b) {
if (L->