Documentation ¶
Overview ¶
lfs stands for Lib Functions Steph
lfs stands for Lib Functions Steph
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFactorial ¶
GetFactorial returns the factorials of a number. It returns 0 when 0 or smaller.
func Getdivisors ¶
* Getdivisors tries like in the linked example to divide all numbers under the squareroot. Each result is also a divisor. We have to check if it's the same though: 100 / 10 = 10. The second half works backwards: 100/1 = 100, 100/2 = 50 So we store those apart and in the end return those reversed. https://www.geeksforgeeks.org/find-all-divisors-of-a-natural-number-set-2/ *
func Gettrianglenumber ¶
Gettrianglenumber gets the n'th triangle number. The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28
Types ¶
This section is empty.