Skip to content

Instantly share code, notes, and snippets.

@dualbus
Created November 14, 2013 18:05
Show Gist options
  • Save dualbus/7471482 to your computer and use it in GitHub Desktop.
Save dualbus/7471482 to your computer and use it in GitHub Desktop.
package main
import (
"os"
"strconv"
)
func fibonacci(n int) uint64 {
if n > 0 {
return fibonacci(n - 1) * uint64(n);
}
return uint64(1);
}
func main() {
in, _ := strconv.Atoi(os.Args[1])
println(fibonacci(in))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment