#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/12/19 04:36:34
#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