#include<stdio.h>
#include<malloc.h>
typedef int TelemType;
typedef struct Lnode
{
TelemType data;
struct Lnode *next;
} LNode;
LNode *create_LinkList(void)
{
int data,ok=1;
LNode *head,*p,*s;
head=(LNode*)malloc(sizeof(LNode));
head->next=NULL;
while(ok)
{
printf("输入节点的值");
scanf("%d",&data);
if(data<=10)
{ s=head;
p=(LNode*)malloc(sizeof(LNode));
p->data=data;
p->next=s->next;s->next=p;s=p;
}
else ok=0;
}
return(head);
}
void output_LinkList(LNode *L)
{
LNode *q;
q=L->next;
while(q!=NULL)
{
printf("%d",q->data);
q=q->next;
}
}
void main()
{
LNode *lc;
lc=create_LinkList();
printf("输出量表节点的值");
output_LinkList(lc);
getchar();
getchar();
}