Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
21
Task/Leonardo-numbers/Chipmunk-Basic/leonardo-numbers.basic
Normal file
21
Task/Leonardo-numbers/Chipmunk-Basic/leonardo-numbers.basic
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
100 sub leonardo(l0,l1,suma,texto$)
|
||||
110 print "Numeros de ";texto$;" (";l0;",";l1;",";suma;"):"
|
||||
120 for i = 1 to limit
|
||||
130 if i = 1 then
|
||||
140 print l0;
|
||||
150 else
|
||||
160 if i = 2 then
|
||||
170 print l1;
|
||||
180 else
|
||||
190 print l0+l1+suma;
|
||||
200 tmp = l0
|
||||
210 l0 = l1
|
||||
220 l1 = tmp+l1+suma
|
||||
230 endif
|
||||
240 endif
|
||||
250 next i
|
||||
260 print chr$(10)
|
||||
270 end sub
|
||||
280 limit = 25
|
||||
290 leonardo(1,1,1,"Leonardo")
|
||||
300 leonardo(0,1,0,"Fibonacci")
|
||||
Loading…
Add table
Add a link
Reference in a new issue