Discover Packages
github.com/TannerGabriel/learning-go
algorithms
math
Factorial
package
Version:
v0.0.0-...-988b5a2
Opens a new window with list of versions in this module.
Published: Feb 25, 2023
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Factorial Sequence
The factorial function is a mathematical formula represented by an exclamation mark "!". The factorial of a non-negative integer n is the p roduct of all positive integers less than or equal to n.
Here’s an example:
7! = 1 * 2 * 3 * 4 * 5 * 6 * 7 = 5.040
n
n!
0
1
1
1
2
2
3
6
4
24
5
120
6
720
7
5 040
8
40 320
9
362 880
10
3 628 800
Implementation
Expand ▾
Collapse ▴
Documentation
¶
func FactorialRecursive(num int ) int
Source Files
¶
Click to show internal directories.
Click to hide internal directories.