Data update

This commit is contained in:
Ingy döt Net 2025-02-27 18:35:13 -05:00
parent 8e4e15fa56
commit 72eb4943cb
1853 changed files with 35514 additions and 9441 deletions

View file

@ -1,25 +1,20 @@
REM Leonardo numbers
DECLARE SUB leonardo (L0!, L1!, suma!, texto$)
CONST limit = 25
CALL leonardo(1, 1, 1, "Leonardo")
CALL leonardo(0, 1, 0, "Fibonacci")
CALL leonardo(1, 1, 1, "Numeros de Leonardo")
CALL leonardo(0, 1, 0, "Numeros de Fibonacci")
END
SUB leonardo (L0, L1, suma, texto$)
PRINT "Numeros de "; texto$; " ("; L0; ","; L1; ","; suma; "):"
FOR i = 1 TO limit
IF i = 1 THEN
PRINT L0;
ELSE
IF i = 2 THEN
PRINT L1;
ELSE
PRINT L0 + L1 + suma;
LET tmp = L0
LET L0 = L1
LET L1 = tmp + L1 + suma
END IF
END IF
PRINT texto$; " ("; L0; ","; L1; ","; suma; "):"
IF limit >= 1 THEN PRINT L0;
IF limit >= 2 THEN PRINT L1;
FOR i = 3 TO limit
PRINT L0 + L1 + suma;
LET tmp = L0
LET L0 = L1
LET L1 = tmp + L1 + suma
NEXT i
PRINT CHR$(10)
PRINT
END SUB