源码12345678910111213141516171819202122232425262728293031323334353637383940414243#include <stdio.h>#include <stdlib.h>typedef struct Node{ int data; struct Node *next;}LNode,*LinkList;LinkList Create_LinkList1(){ LinkList L=NULL; LNode *s; int x; scanf("%d",&x); while(x!=0) { s=(LinkList)malloc(sizeof(LNode)); s->data=x; s->next=L; L=s; scanf("%d",&x); } return L;}void PrintList(LinkList L){ LNode*s=L; while(s!=NULL) { printf("%d ",s->data); s=s->next; }}int main(){ LinkList L; L=Create_LinkList1(); PrintList(L); return 0;} 运行效果图