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


DECLARE SUB triangle (x AS INTEGER, y AS INTEGER, length AS INTEGER, n AS INTEGER)
 
CLS
triangle 1, 1, 16, 5
 
SUB triangle (x AS INTEGER, y AS INTEGER, length AS INTEGER, n AS INTEGER)
    IF n = 0 THEN
        LOCATE y, x: PRINT "*";
    ELSE
        triangle x, y + length, length / 2, n - 1
        triangle x + length, y, length / 2, n - 1
        triangle x + length * 2, y + length, length / 2, n - 1
    END IF
END SUB