title: CS50 mario pyramid upside down can't figure why
body: <p>I thought long and hard before asking this in here but I've spent too much time now trying to figure this one out without cheating.
  The CS50 mario ps1 (less comfortable) asks for a *simple left align (at first) pyramid, but my code is giving me it upside down and I can't figure why.</p>
  <pre><code>#include &lt;cs50.h&gt;
  #include &lt;stdio.h&gt;
  
  int main (void)
  {
      int n;
      do
      {
          n = get_int(&quot;Pyramid Height: &quot;);
      }
      while (n &lt; 1 || n &gt; 8);
      for (int i = 0; i &lt; n; i++) 
      {
          for (int j = 0; j &lt; n - i ; j++)
              printf(&quot;#&quot;);
          for (int j = 0; j &lt; n - i; j++) 
          {
              printf(&quot; &quot;);
          }
          printf(&quot;\n&quot;);
      }
  }
  </code></pre>
  <p>I'm sorry if this type of questioning shows up regularly here but I really do need your help.
  Thanks in advance.</p>
  <p>edit:</p>
  <ul>
  <li>expected result:</li>
  </ul>
  <pre><code>........#
  .......##
  ......###
  .....####
  ....#####
  ...######
  ..#######
  .########
  </code></pre>
  <ul>
  <li><p>I can change the dots to spaces afterwards, this is just for visualisation;</p>
  </li>
  <li><p>the restriction for height is 8, so I guess that each line has always eight characters;</p>
  </li>
  <li><p>I actually added trailing spaces so that the pyramid could be right aligned, I've metioned wrong before;</p>
  </li>
  <li><p>I'm going to check the <a href="https://ericlippert.com/2014/03/05/how-to-debug-small-programs/" rel="nofollow noreferrer">How to debug small programs?</a>;</p>
  </li>
  <li><p>Sorry, I'm new to this, I didn't know there was a difference between here and stack exchange, gonna look into that.</p>
  </li>
  </ul>
  <p>*Sorry for the &quot;meh&quot; english, it is not my native language.</p>