Floyd's triangle: Difference between revisions
fixed Arturo solution
(Added Chipmunk Basic, GW-BASIC and MSX Basic) |
Drkameleon (talk | contribs) (fixed Arturo solution) |
||
Line 1,240:
=={{header|Arturo}}==
<syntaxhighlight lang="rebol">
floor 2 + log col + 1 + (rows * rows - 1) / 2 10
]
floyd: function [rows][
row: new []▼
'result ++ @[row]▼
while -> row =< rows [
prints pad ~"|n|" width rows col
inc 'col
inc 'n
print ""
col: 0
inc 'row
]
]
]
floyd 5
print ""
▲ f: floyd j
▲ print ""
▲]</syntaxhighlight>
{{out}}
<pre>
2
4
7
11
1
2
4
7
11
16
22
29
37
46
56
67
79
92
=={{header|AutoHotkey}}==
|