Update zero factorial
The Definition of a Zero Factorial Because zero has no lower numbers but is still in and of itself a number, there is still but one possible combination of how that data set can be arranged: it cannot. This still counts as one way of arranging it, so by definition, a zero factorial is equal to one, just as 1! is equal to one because there is only a single possible arrangement of this data set.
This commit is contained in:
committed by
GitHub
parent
d8da439590
commit
b4c440089f
@@ -3,7 +3,7 @@ package main
|
||||
import "fmt"
|
||||
|
||||
func fact(x int) int {
|
||||
if x == 1 {
|
||||
if x == 0 {
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user