title: Normal And UpsideDown Triangle of stars in C++
body: <p>I need to create a upsidedown triangle and a normal triangle and it should look like this:</p>
  
  <pre><code>***********
   *********
    *******
     *****
      ***
       *          
       *
      ***
     *****
    *******
   *********
  ***********
  </code></pre>
  
  <p>I created something but I get 5 new lines and than the other triangle:</p>
  
  <pre><code>***********
   *********
    *******
     *****
      ***
       *
  
  
  
  
  
       *
      ***
     *****
    *******
   *********
  ***********
  </code></pre>
  
  <p>Here is the C++ code , Hope someone can resolve my issue : </p>
  
  <pre><code>int n,i,j;
  
  cout&lt;&lt;"Give the Number N of Stars ";
  cin&gt;&gt;n;
  
  for(i=1; i&lt;=n; i++)
  {    
      for(j=1;j&lt;=i-1;j++)
          cout&lt;&lt;" ";
       for(j=i;j&lt;=n-i+1;j++)
          cout&lt;&lt;"*";
       cout&lt;&lt;"\n";
  }
  
  for(i=1;i&lt;=n;i++)
  {    
      for(j=i;j&lt;=n-1;j++)
          cout&lt;&lt;" ";
      for(j=1;j&lt;=2*i-n;j++)
          cout&lt;&lt;"*";
      cout&lt;&lt;"\n";
  }
  </code></pre>