title: star patterns using while loops
body: <p>I'd like to make star patterns in this link</p>
  
  <p><a href="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTpq63AaQe8nlrbBKskHUlz2fLu3U6-7KJbNqXgDDqLujjhJm8r" rel="nofollow noreferrer">https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTpq63AaQe8nlrbBKskHUlz2fLu3U6-7KJbNqXgDDqLujjhJm8r</a></p>
  
  <p>by while loops and do-while loops, but have some problems plz help</p>
  
  <pre><code>int i,j,k;
  i = 5;
  j = 1;
  k = 5;
  
  while (i &gt; 0)
  {   
      while (j &lt; i)
      {
          printf(" ");
          j++;
      }
      while (k &gt;= i)
      {
          printf("*");
          k--;
      }
      printf("\n");
      i--;
  }
  </code></pre>
  
  <p>why isn't it working? where should I fix?</p>