title: Reading triple nested for loop
body: <p>My code is as follows. My confusion occurs during the 2nd and 3rd loop. Why does the result return 1*** then 12** then 123* then 1234.. I get the j loop is reset to 0 but doesn't it reenter the k loop whenever its true that j&lt;=i?</p>
  
  <pre><code>for(int i = 1; i &lt;= 4; i++)
  {
      for(int j = 1; j &lt;= i; j++)
          cout &lt;&lt; j;
      for(int k = 4 - i; k &gt;= 1; k--)
          cout &lt;&lt; "*";
  
      cout &lt;&lt; endl;
  }
  </code></pre>