4eyes4u

Untitled

Jan 16th, 2017
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. bool ntiNivo (int n, cvor *root)
  2. {
  3.     if (root!=NULL)
  4.     {
  5.         if (n!=0)
  6.         {
  7.             ntiNivo(n-1, root->l);
  8.             ntiNivo(n-1, root->r);
  9.         }
  10.         else printf ("%d\n", root->val);
  11.         return true;
  12.     }
  13.     return false;
  14. }
  15.  
  16. void ispisi ()
  17. {
  18.     int nivo=0;
  19.     while (ntiNivo(nivo, root)) nivo++;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment