Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,27 @@
' FB 1.05.0 Win64
Function digitalRoot(n As UInteger, ByRef ap As Integer, base_ As Integer = 10) As Integer
Dim dr As Integer
ap = 0
Do
dr = 0
While n > 0
dr += n Mod base_
n = n \ base_
Wend
ap += 1
n = dr
Loop until dr < base_
Return dr
End Function
Dim As Integer dr, ap
Dim a(3) As UInteger = {627615, 39390, 588225, 393900588225}
For i As Integer = 0 To 3
ap = 0
dr = digitalRoot(a(i), ap)
Print a(i), "Additive Persistence ="; ap, "Digital root ="; dr
Print
Next
Print "Press any key to quit"
Sleep