DLR(liuyu *root)
/*中序遍历 递归函数*/
{ if (root!=NULL)
{ if ((root->lchild==NULL)&&(root->rchild==NULL)){sum++; printf ("%d\n",root->data);}
DLR (root->lchild);
DLR (root->rchild); }
Return (0);
}
int LeafCount_BiTree(Bitree T)//求二叉树中叶子结点的数目
{
If (!T) return 0; //空树没有叶子
else if (!T->lchild&&!T->rchild) return 1; //叶子结点
else return Leaf_Count(T->lchild)+Leaf_Count(T->rchild);//左子树的叶子数加
上右子树的叶子数
}//LeafCount_BiTree