Task
Produce an ASCII representation of a Sierpinski triangle of order   N.



Example
The Sierpinski triangle of order   4   should look like this:

                       *
                      * *
                     *   *
                    * * * *
                   *       *
                  * *     * *
                 *   *   *   *
                * * * * * * * *
               *               *
              * *             * *
             *   *           *   *
            * * * *         * * * *
           *       *       *       *
          * *     * *     * *     * *
         *   *   *   *   *   *   *   *
        * * * * * * * * * * * * * * * *



Related tasks
 Sierpinski triangle/Graphical for graphics images of this pattern. 
 Sierpinski carpet


procedure PrintSierpinski(order : Integer);
var
   x, y, size : Integer;
begin
   size := (1 shl order)-1;
   for y:=size downto 0 do begin
      Print(StringOfChar(' ', y));
      for x:=0 to size-y do begin
         if (x and y)=0 then
            Print('* ')
         else Print('  ');
      end;
      PrintLn('');
   end;
end;
 
PrintSierpinski(4);
 