title: Print Pascal Pattern
body: <p>Please Help me out to print this pattern and also explain logic behind it. THank you in advance.</p>
  
  <pre><code>      0
      111
    22222
  3333333
  </code></pre>
  
  <p>My Pascal Code is:</p>
  
  <pre><code>program patnum;
              uses crt;
              var
                 row, col1, col2, totalRows, totalCol: integer;
              Begin
                   clrscr;
                   totalRows := 3;
                   totalCol := totalRows-2;
                          for row := 0 to totalRows do
                          begin
                                  for col1 := 0 to totalCol do
                                  begin
                                     write(' ');
                                  end;
                                  totalCol := totalCol - 1;  
                                  for col2 := 0 to row do
                                  begin
                                     write(row);
                                  end;
                          writeln('');
                          end;
                   readln;
              End.
  </code></pre>
  
  <p><strong>* Please Help *</strong></p>