Leonardo numbers: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
(One intermediate revision by one other user not shown)
Line 961:
6765 10946 17711 28657 46368
</pre>
 
=={{header|EasyLang}}==
<syntaxhighlight lang="easylang">
proc leonardo L0 L1 add . .
print "L0:" & L0 & " L1:" & L1 & " add:" & add
write L0 & " "
write L1 & " "
for i = 2 to 24
tmp = L0
L0 = L1
L1 = tmp + L1 + add
write L1 & " "
.
print ""
.
leonardo 1 1 1
leonardo 0 1 0
</syntaxhighlight>
 
=={{header|EMal}}==
Line 2,539 ⟶ 2,557:
 
=={{header|Wren}}==
<syntaxhighlight lang="ecmascriptwren">var leonardo = Fn.new { |first, add, limit|
var leo = List.filled(limit, 0)
leo[0] = first[0]
Line 2,562 ⟶ 2,580:
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368
</pre>
 
 
=={{header|Yabasic}}==
9,482

edits