Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
Function factors(num As UInt64) As UInt64()
|
||||
'This function accepts an unsigned 64 bit integer as input and returns an array of unsigned 64 bit integers
|
||||
Dim result() As UInt64
|
||||
Dim iFactor As UInt64 = 1
|
||||
While iFactor <= num/2 'Since a factor will never be larger than half of the number
|
||||
If num Mod iFactor = 0 Then
|
||||
result.Append(iFactor)
|
||||
End If
|
||||
iFactor = iFactor + 1
|
||||
Wend
|
||||
result.Append(num) 'Since a given number is always a factor of itself
|
||||
Return result
|
||||
End Function
|
||||
Loading…
Add table
Add a link
Reference in a new issue