title: Drawing numeric diamond
body: <p>I need to draw a numeric diamond, for example with a height of <code>9</code>:</p>
  <pre><code>    1
     222
    33333
   4444444
  555555555
   4444444
    33333
     222
      1
  </code></pre>
  <p>I wrote the code and I managed to get the same diamond, but with stars. I want it with these numbers. How can I do that? Here is what I have done so far:</p>
  <pre class="lang-java prettyprint-override"><code>for (int i = 1; i &lt; 10; i += 2) {
      for (int j = 0; j &lt; 9 - i / 2; j++)
          System.out.print(&quot; &quot;);
      for (int j = 0; j &lt; i; j++)
          System.out.print(&quot;a&quot;);
      System.out.print(&quot;\n&quot;);
  }
  
  for (int i = 7; i &gt; 0; i -= 2) {
      for (int j = 0; j &lt; 9 - i / 2; j++)
          System.out.print(&quot; &quot;);
      for (int j = 0; j &lt; i; j++)
          System.out.print(&quot;b&quot;);
      System.out.print(&quot;\n&quot;);
  }
  </code></pre>