title: Making a numerical Pyramid
body: <p>Firstly this is homework so I'm not looking for an answer to the question just a pointer as to where to go next. I'm supposed to take a user input (x) in this instance 3, and return a pyramid that looks like this based on the input;</p>
  
  <pre><code>    1
    2 1 2
  3 2 1 2 3
  </code></pre>
  
  <p>I tried to break the problem down into printing from 1 up to x and from x down to one and to concatenate the two. This is not working, at all!
  This is my code so far</p>
  
  <pre><code>import java.util.Scanner;
  
  public class Q8 {
  
      public static void main(String[] args) 
      {
          Scanner user_input = new Scanner (System.in);
  
          System.out.println("Please enter an integer 1-15:");
          int input = user_input.nextInt();
  
          for(int row=1;row&lt;=input;row++)
          {
              for(int back=input;back&gt;=2;back--)
              {
                  System.out.print(back+" ");
              }
              for(int col=1;col&lt;=row;col++)
              {
              System.out.print(col+" ");
              }
  
              System.out.println();
          }
  
  
  
  
      }
  }
  </code></pre>
  
  <p>The problem is rather than printing the above pyramid it prints;</p>
  
  <pre><code> 3 2 1
   3 2 1 2
   3 2 1 2 3
  </code></pre>