title: Making patterns in java with nested loops
body: <p>I'm having trouble figuring out This last pattern in a java assignment. I know I'm close but I can't figure it out here's my code:</p>
  
  <pre><code>public static void main(String[]args){
      System.out.println("Pattern D:");
      for (int i = 6; i&gt;=1; i--) { // row
          int x = 6; // Counter?
          for (int j = 1; j&lt;=i; j++){ //column
              System.out.print("");
              x--;
          } 
          for(int k=1;k&lt;=i;k++) {
              System.out.print(x);
          } 
          System.out.println();
      }
  }
  </code></pre>
  
  <p>I understand that the outer loop is the rows and the inner the columns, but that's not the part I have wrong. My pattern it self is right but not the out put of the numbers.
  I can't put my output on here because it won't format right. But if you copied my code exactly instead of a line of 0,then 1, then, 2... etc, I'm trying to get 1 2 3 4 5 6 on the top line, then 1 2 3 4 5, the next line and so on...</p>