title: Making an ASCII rhombus with loops
body: <p>I got a problem to create a rhombus, my code here:</p>
  <pre class="lang-java prettyprint-override"><code>package random;
  
  public class asd {
      public static void main(String args[]) {
          for (int j = 1; j &lt;= 4; j++) {
              for (int kong = 4 - j; kong &gt;= 1; kong--) {
                  System.out.print(&quot; &quot;);
              }
              for (int xing = 1; xing &lt;= 2 * j - 1; xing++) {
                  System.out.print(&quot;*&quot;);
              }
              System.out.println();
          }
          for (int a = 1; a &lt;= 3; a++) {
              for (int b = 1; b &lt;= a; b++) {
                  System.out.print(&quot; &quot;);
              }
              for (int c = 5; c &gt;= 1; c -= 2) { // &lt;==== here
                  System.out.print(&quot;*&quot;);
              }
              System.out.println();
          }
      }
  }
  </code></pre>
  <p>However, the output is:</p>
  <pre><code>   *
    ***
   *****
  *******
   ***
    ***
     ***
  </code></pre>
  <p>I think the problem is in the code which I highlighted.</p>