You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package main
|
|
|
|
import "fmt"
|
|
|
|
func su(n int) int {
|
|
if n == 0 {
|
|
return 1
|
|
} else {
|
|
return n * su(n-1)
|
|
}
|
|
}
|
|
|
|
func main() {
|
|
fmt.Println(su(7))
|
|
}
|