title: Make a triangle shape in C++
body: <p>I am trying to print out the shape of a triangle but I am kinda lost...</p>
  
  <p>this is what I have so far:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main()    
  {
      int i, k, n;
  
      cout &lt;&lt; "Please enter number of rows you want to see: \n";
      cin &gt;&gt; n;
      for (k = 1; k &lt;= n; k++)
      {
          for (i = 1; i &lt;= k; i++)
              cout &lt;&lt; '*';
          cout &lt;&lt; endl;
      }
  
      getchar();
      getchar();
      return 0;    
  }
  </code></pre>