RosettaCodeData/Task/Sierpinski-triangle/E/sierpinski-triangle-3.e
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

10 lines
264 B
Text
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def printSierpinski(order, out) {
def size := 2**order
for y in (0..!size).descending() {
out.print(" " * y)
for x in 0..!(size-y) {
out.print((x & y).isZero().pick("◢◣", "  "))
}
out.println()
}
}