输入完毕退不出来是怎么回事
typedef struct bt{int data;
struct bt *lchild;
struct bt *rchild;}tree;
tree *st[100];
tree *creat()
{ int i,vale;
tree *p;
tree *t;
t=st[1];
printf("qing shu ru er cha shu de jie dian zhi ji xu hao\n");
scanf("%d%d",&vale,&i);
p=(tree *)malloc(sizeof(tree));
p->data=vale;
p->rchild=0;
p->lchild=0;
st[i]=p;
scanf("%d%d",&vale,&i);
while(vale!=10000)
{ p=(tree *)malloc(sizeof(tree));
p->data=vale;
p->rchild=0;
p->lchild=0;
if(i%2==0)
st[i/2]->lchild=p;
else st[i/2]->rchild=p;
scanf("%d%d",&vale,&i);}
return t;
}
vist(tree *k)
{ if (k!=0)
{printf("%d",k->data);
vist(k->lchild);
vist(k->rchild);}
else printf("gai shu shi yi ke kong shu\n");}
main()
{ tree *l;
l=creat();
vist(l);}