Answers for "golang factorial recursion"

0

golang factorial recursion

func fact(n int) int {
    if n == 0 {
        return 1
    }
    return n * fact(n-1)
}
Posted by: Guest on May-08-2021

Browse Popular Code Answers by Language