#include
#include
typedef struct splist
{
double data;
splist next;
}splist;
void DY(splist *L)
{
splist *p;
p=L->next;
while(p)
{
printf("%lf",&p->next);
L=L->next;
}
}
void CJ(splist *L)
{
splist *p;
L=(splist)malloc(sizeof(splist));
L->next=NULL;
double c;
double a;
a=1;
printf("请开始建表输入666结束");
while(a!=666)
{
p=(splist*)malloc(sizeof(splist));
scanf("%lf",&c);
p->data=c;
p->next=L->next;
L->next=p;
a=c;
}
}
int main()
{
splist L;
L=(splist)malloc(sizeof(splist));
CJ(L);
DY(L);
return 0;
}