title: How to draw diamond with asterisks
body: <p>For my assignment I am supposed to make a Draw a diamond with asterisks using methods.</p>
  
  <p>I figured out how to make the first part (centered triangle)</p>
  
  <p>I cannot for the love of God figure it out. I have spent over 4 hours trying different things and I figured how to make an upside down triangle, but the diamond is not working out.</p>
  
  <p>This is what I have for the first part. Can someone tell me how to flip it so that it will form a diamond when used with an upside down version?</p>
  
  <pre><code>{
      int rows = userInputHeight;
  
      int starCount = 1;
      int spaceCount = rows - 1;
  
      for( int rowCount = 1; rowCount &lt;= rows; rowCount++ )
      {
          for( int numb = 1; numb &lt;= spaceCount; numb++ )
          {
              System.out.print(" ");
          }
          for( int count = 1; count &lt;=starCount; count++  )
          {
              System.out.print("*");
          }
          System.out.println();
          starCount += 2;
          spaceCount--;
      }
  }
  </code></pre>
  
  <p>This is what it displays (UserInputHeight = 10):</p>
  
  <pre><code>     *
      ***
     *****
    *******
   *********
  ***********
  </code></pre>
  
  <hr>
  
  <hr>
  
  <hr>
  
  <hr>
  
  <p>This is what I want (UserInputHeight = 19):</p>
  
  <pre><code>     *
      ***
     *****
    *******
   *********
  ***********
  </code></pre>
  
  <hr>
  
  <hr>
  
  <hr>
  
  <hr>
  
  <hr>
  
  <hr>
  
  <hr>
  
  <pre><code>***********
   *********
    *******
     *****
      ***
       *
  </code></pre>
  
  <p>This is what I have so far for the second part:</p>
  
  <p>{
              int rows = userInputHeight;</p>
  
  <pre><code>        int starCount = rows*2;
          int spaceCount =userInputPadding;
  
          if (userInputHeight % 2 == 0)
          {
              userInputHeight+=1;
          }
          for (int rowCount = rows; rowCount  &gt;= 1; rowCount --) 
          {
              for (int i = 0; i &lt;=  (rows - rowCount)+ spaceCount; i++)
              {
                  System.out.print(' ');
              }     
              for (int i = 1; i &lt; starCount; i++)
              {
                  System.out.print('*');
              }
              System.out.println();
              starCount -=2;
          }
      }
  </code></pre>
  
  <p>Please help.</p>