Floyd's triangle: Difference between revisions
m
→{{header|AppleScript}}: →Straightforward: Minor simplification.
(→AppleScript :: Functional: Added a variant defining Floyd as a partially populated matrix) |
m (→{{header|AppleScript}}: →Straightforward: Minor simplification.) |
||
Line 1,164:
92 93 94 95 96 97 98 99 100 101 102 103 104 105
</pre>
----
===Straightforward===
<lang applescript>on FloydsTriangle(n)
set triangle to {}
set i to 0
repeat with i from (i + 1) to (i + w)
set end of
end repeat
set end of triangle to
end repeat
return triangle
end FloydsTriangle
|