#include#include#include#define LEN sizeof(struct LinkList)struct LinkList{int numb;struct LinkList *next;};int a;struct LinkList *creat(void){struct LinkList *head;struct LinkList *p1,*p2;a=0;p1=p2=(struct LinkList *)malloc(LEN);scanf("%d",&p1->numb

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/08 19:55:37

#include#include#include#define LEN sizeof(struct LinkList)struct LinkList{int numb;struct LinkList *next;};int a;struct LinkList *creat(void){struct LinkList *head;struct LinkList *p1,*p2;a=0;p1=p2=(struct LinkList *)malloc(LEN);scanf("%d",&p1->numb

#include
#include
#include
#define LEN sizeof(struct LinkList)
struct LinkList
{
int numb;
struct LinkList *next;
};
int a;
struct LinkList *creat(void)
{
struct LinkList *head;
struct LinkList *p1,*p2;
a=0;
p1=p2=(struct LinkList *)malloc(LEN);
scanf("%d",&p1->numb);
head=NULL;
while(p1->numb!=0)
{ a=a+1;
if(a==1)head=p1;
else p2->next=p1;
p2=p1;
p1=(struct LinkList *)malloc(LEN);
scanf("%d",&p1->numb);
}
p2->next = NULL;
return head;
}

#include#include#include#define LEN sizeof(struct LinkList)struct LinkList{int numb;struct LinkList *next;};int a;struct LinkList *creat(void){struct LinkList *head;struct LinkList *p1,*p2;a=0;p1=p2=(struct LinkList *)malloc(LEN);scanf("%d",&p1->numb
&&p->data!=e p=p->next p==NULL