title: Print Tree With Recursive Function
body: <p>My goal is: when I input "e c d g a f b", then the output is</p>
  
  <pre><code>e
  
  (\t) c                &lt;- first left node
  
  (\t)(\t) a            &lt;- second left node
  
  (\t)(\t)(\t) b        &lt;- third right node
  
  (\t)(\t) d            &lt;- second right node
  
  (\t) g                &lt;- first right node
  
  (\t)(\t) f            &lt;- second left node
  </code></pre>
  
  <p>But I can't get it to work as intended.</p>
  
  <p>This is an example from "The C programing Language" by Brian W. Kernighan and Dennis M. Ritchie.</p>
  
  <p>I change my functions, how can i see \t in output window.</p>
  
  <p>My attempt:</p>
  
  <pre><code>void prt(AW *p)
  {
  int j;
  int temp;
  
  if(p != NULL)
  {   
            temp = judge;
  
      while(1)
      {   temp = temp / 2;
          count++;
          if(temp == 0)
              break;
      }
  
      for(j=1; j&lt;count; j++)
          putchar('\t');
      printf("%-16s\n",p-&gt;word);
  
      count=0;
  
      if(p-&gt;left != NULL)judge++;
      prt(p-&gt;left);       
  
      if(p-&gt;right != NULL)judge++;
      prt(p-&gt;right);      }
  </code></pre>
  
  <p>}</p>