Leonardo numbers: Difference between revisions
→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)"
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
(→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)") |
||
Line 2,218:
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|V (Vlang)}}==
{{trans|go}}
<syntaxhighlight lang="v (vlang)">fn leonardo(n int, l0 int, l1 int, add int) []int {
mut leo := []int{len: n}
leo[0] = l0
Line 2,245:
[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|Wren}}==
|