#include<stdio.h>
#include<malloc.h>
typedef struct Linknode
{ int data;
struct Linknode *next;
}Node,*Linklist;
Linklist Inlist()
{ Linklist h;
h = (Linklist)malloc(sizeof(Node));
h->next = NULL;
return h;
}
Linklist Creatlistwei(Linklist h,int n)
{ Linklist L,r;
int i;
for(i=0;i<n;i++)
{ int c;
scanf("%d",&c);
r=h;
L=(Linklist)malloc(sizeof(Node));
//L->next = NULL;
L->data = c;
r->next =L;
r=L;
}
r->next = NULL;
}
void Nodeprint(Linklist h)
{ int i;
Linklist L;
L= h->next;
while(L!=NULL)
{
printf("%d ",L->data);
L=L->next;
}
}
int main()
{ Linklist h;
h=Inlist();
int n;
printf("请输入要创立表的个数:");
scanf("%d",&n);
//Creatlist(h,n);
Creatlistwei(h,n);
Nodeprint(h);
return 0;
}