title: java help printing * and # into a square
body: <p>//The question itself (my code after that)</p>
  
  <p>Variable n is randomly generated integer. Output characters '*' and '#' so that the first row contains only stars and the last one only number signs. The number of stars decreases in each consecutive row. The total number of characters in a row is n and there are n + 1 rows.</p>
  
  <p>For example, if n has value 5, the program would output:</p>
  
  <pre><code> *****  
   ****#    
   ***##      
   **###       
   *####      
   #####      
  </code></pre>
  
  <p>//My code below!</p>
  
  <pre><code>Random r = new Random();       
  int n = r.nextInt(5) + 10;    
  System.out.println("n: "+n);
  
  while(n&gt;0){
  
  for(int star = n; star&gt;0; star--){
    System.out.print("*");
  }
  
  for(int hash = 0; hash&lt;n; hash++){
    System.out.print("#");
  
      } 
  
      System.out.println("");  //new line
  n--;
  
  
  }
  </code></pre>
  
  <p>//My code output - problem: the #'s need to increase in size from 0 rather than decrease like the *'s</p>
  
  <pre><code>**********##########
  *********#########
  ********########
  *******#######
  ******######
  *****#####
  ****####
  ***###
  **##
  *#
  </code></pre>