Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
25
Task/Leonardo-numbers/OxygenBasic/leonardo-numbers.basic
Normal file
25
Task/Leonardo-numbers/OxygenBasic/leonardo-numbers.basic
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
uses console
|
||||
|
||||
sub leonardo(L0 as integer, L1 as integer, suma as integer, texto as string)
|
||||
int i, tmp
|
||||
printl "Numeros de " texto " (" L0 "," L1 "," suma "):"
|
||||
for i = 1 to 25
|
||||
if i = 1 then
|
||||
print " " L0;
|
||||
elseif i = 2 then
|
||||
print " " L1;
|
||||
else
|
||||
print " " L0 + L1 + suma;
|
||||
tmp = L0
|
||||
L0 = L1
|
||||
L1 = tmp + L1 + suma
|
||||
end if
|
||||
next i
|
||||
printl cr
|
||||
end sub
|
||||
|
||||
leonardo(1,1,1,"Leonardo")
|
||||
leonardo(0,1,0,"Fibonacci")
|
||||
|
||||
printl cr "Enter ..."
|
||||
waitkey
|
||||
Loading…
Add table
Add a link
Reference in a new issue