21 lines
390 B
Plaintext
21 lines
390 B
Plaintext
limit = 25
|
|
leonardo(1,1,1,"Leonardo")
|
|
leonardo(0,1,0,"Fibonacci")
|
|
end
|
|
|
|
sub leonardo(L0, L1, suma, texto$)
|
|
local i
|
|
print "Numeros de " + texto$, " (", L0, ",", L1, ",", suma, "):"
|
|
for i = 1 to limit
|
|
if i = 1 then print L0, " ";
|
|
elsif i = 2 then print L1, " ";
|
|
else
|
|
print L0 + L1 + suma, " ";
|
|
tmp = L0
|
|
L0 = L1
|
|
L1 = tmp + L1 + suma
|
|
endif
|
|
next i
|
|
print chr$(10)
|
|
end sub
|