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:
Dmitry Neverovski
2019-11-20 20:15:19 +03:00
committed by GitHub
parent d8da439590
commit b4c440089f

View File

@@ -3,7 +3,7 @@ package main
import "fmt"
func fact(x int) int {
if x == 1 {
if x == 0 {
return 1
}