RosettaCodeData/Task/Sierpinski-triangle/BASIC256/sierpinski-triangle.basic

15 lines
259 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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