title: Print pyramid using recursion only
body: <p>I managed to print a pyramid with loops like this:</p>
  
  <pre><code>void printtree() {
    for (int i=0; i&lt;row; i++){
      for (int j=0; j&lt;row-i-1; j++)
        System.out.print(" ");
      for (int k=row; k&gt;row-i-1; k--)
        System.out.print("* ");
      System.out.println();
    }
  }
  </code></pre>
  
  <p>The output looks like this:</p>
  
  <pre><code>        * 
         * * 
        * * * 
       * * * * 
      * * * * * 
     * * * * * * 
    * * * * * * * 
   * * * * * * * * 
  * * * * * * * * * 
  </code></pre>
  
  <p>I would like to make this using recursion only, how should I construct the function? My concern is with the nested loop, I could only interprete the single inside or ouside loop. I know it is imterpreted with (row-1) spaces followed by row # of "* " on each line, then change to a new line. What is the base case here?</p>