RosettaCodeData/Task/Sierpinski-triangle/BASIC256/sierpinski-triangle.basic
2023-07-01 13:44:08 -04:00

14 lines
259 B
Text

clg
call triangle (1, 1, 60)
end
subroutine triangle (x, y, l)
if l = 0 then
color blue
text (x, y, "*")
else
call triangle (x, y + l, int(l/2))
call triangle (x + l, y, int(l/2))
call triangle (x + l * 2, y + l, int(l/2))
end if
end subroutine