基本思想:
非叶子结点的左孩子或右孩子结点不为空,定义计数器count,递归调用。
int count=0;
int CountUnleaf(Bitree T){
if(T==null) //空树
return 0;
if(T->lchild||T->rchild) //根节点满足
count++;
CountUnleaf(T->lchild); //递归调用左孩子、右孩子
CountUnleaf(T->rchild);
return count;
}