title: Printing Pascals Triangle (recursive) (JAVA)
body: <p>So far I have this, but I am not quite sure how printPTriangle can print the triangle using the code. If someone could help me out with this, I would be grateful.</p>
  
  <pre><code>public static int factorial(int n) {
      if (n == 1) {
          return 1;
      }
      return n * (factorial(n - 1));
  }
  
  public static int pascalsNumber(int x, int y) {
      return factorial(x)/(factorial(y) * factorial((x - y))); //Using combinations formula
  }
  
  public static void printPTriangle(int z) {
  
  
  
  }
  </code></pre>