Advertisement
Guest User

Untitled

a guest
May 29th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. void ABPOddPrint (PtABPNode proot)
  2. {
  3. if (proot == NULL) { Error = ABP_EMPTY; return; } /* arvore vazia - empty tree */
  4.  
  5. Error = OK;
  6.  
  7. if (proot->PtLeft != NULL) /* subarvore esquerda - left subtree */
  8. ABPOddPrint (proot->PtLeft);
  9.  
  10. if (proot->Elem % 2)
  11. printf ("%d ", proot->Elem);
  12.  
  13. if (proot->PtRight != NULL) /* subarvore direita - right subtree */
  14. ABPOddPrint (proot->PtRight);
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement