title: C++ code for right triangle using WHILE loop
body: <p>I need to print this triangle:</p>
  
  <pre><code>*
  **
  ***
  ****
  *****
  ******
  *******
  ********
  </code></pre>
  
  <p>using a FOR and WHILE loop. I need help, I have already figured out the for loop version I just have to convert it to while loop but everything I try is not giving me the correct output! Any help is appreciated!</p>
  
  <p>My code so far:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  int main(int argc, char**argv) {
  
      int i = 1;
      int j = 1;
      int N = 8;
  
      while (i &lt;= N)
      {
          i = i++;
          while(j &lt;= i)
          {
              cout&lt;&lt;"*";
              j = j++;
          }
          cout&lt;&lt;endl;
      }
  }
  </code></pre>