Data update

This commit is contained in:
Ingy döt Net 2023-12-16 21:33:55 -08:00
parent 35bcdeebf8
commit 74c69a0df6
2427 changed files with 31826 additions and 3468 deletions

View file

@ -0,0 +1,36 @@
Global.i t = 15, Dim p(t)
Procedure.i padovanN(n, Array p(1))
If n < 2 Or t < 3
For i = 0 To t - 1
p(i) = 1
Next i
ProcedureReturn
EndIf
padovanN(n - 1, p())
For i.i = n + 1 To t - 1
p(i) = 0
For j.i = i - 2 To i - n - 1 Step -1
p(i) = p(i) + p(j)
Next j
Next i
EndProcedure
If OpenConsole()
PrintN("First" + Str(t) + " terms of the Padovan n-step number sequences:")
For n.i = 2 To 8
Print(Str(n) + ":")
padovanN(n, p())
For i.i = 0 To t - 1
Print(RSet(Str(p(i)),4))
Next i
PrintN("")
Next n
PrintN(#CRLF$ + "--- terminado, pulsa RETURN---"): Input()
CloseConsole()
EndIf