title: How to make the star pyramid in odd number of stars?
body: <pre><code>#include&lt;iostream&gt;
  using namespace std;
  
  int main() {
      
      int i, j;
      
      for(i = 1; i &lt;= 5; i++) {
          
          for(j =  1; j &lt;= i; j++) { 
              
              cout&lt;&lt; &quot;*&quot;;
          }
          
          cout&lt;&lt; endl;
      }
      
      return 0;
  }
  </code></pre>
  <p>That is my code above. Odd number as in 1 then 3 stars then 5 stars, etc. All my attempts failed. At first, starts scrolled nonstop. Then only a column of 1 row of stars showed up. It should be so simple, but it's not working out!</p>
  <p>Stuff like i%2 == 0 isn't working.</p>
  <p>Thank you.</p>
  <p>EDIT: Supposed to look like this:</p>
  <pre><code>*
  ***
  *****
  ******
  </code></pre>
  <p>etc</p>