#include
#include
typedef struct Node
{
int data;
struct Node *LChild;
struct Node *RChild;
}BiTNode,*BiTree;
int Leaf_Count=0; //******
//先序遍历创建二叉树
void CreateBiTree(BiTree *bt)
{
int ch;
scanf("%d",&ch);
if(ch==0)
*bt=NULL;
else
{
*bt=(BiTree)malloc(sizeof(BiTree));
(*bt)->data=ch;
CreateBiTree(&((*bt)->LChild));
CreateBiTree(&((*bt)->RChild));
}
}
//先序打印二叉树
void PreOrder(BiTree bt)
{
if(bt)
{
printf("%d ",bt->data);
PreOrder(bt->LChild);
PreOrder(bt->RChild);
}
}
//中序打印二叉树
void InOrder(BiTree bt)