sub rep$(n, c$) local i, s$ for i = 1 to n s$ = s$ + c$ next return s$ end sub sub sierpinski(n) local lim, y, x lim = 2**n - 1 for y = lim to 0 step -1 print rep$(y, " "); for x = 0 to lim-y if and(x, y) then print " "; else print "* "; end if next print next end sub for i = 1 to 5 sierpinski(i) next