📅  最后修改于: 2022-03-11 14:45:00.422000             🧑  作者: Mango
package main
import "fmt"
func fact(n int) int {
if n == 0 {
return 1
}
return n * fact(n-1)
}
func main() {
fmt.Println(fact(7))
}