8 Star 47 Fork 21

Lucky / go-hutool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
16-recursion.go 197 Bytes
一键复制 编辑 原始数据 按行查看 历史
package main
import "fmt"
//fact 函数在到达 fact(0) 前一直调用自身。
func fact(n int) int {
if n == 0 {
return 1
}
return n * fact(n-1)
}
func main() {
fmt.Println(fact(7))
}
Go
1
https://gitee.com/huangbosbos/go-hutool.git
git@gitee.com:huangbosbos/go-hutool.git
huangbosbos
go-hutool
go-hutool
81f09a275c3b

搜索帮助

53164aa7 5694891 3bd8fe86 5694891