Created
November 14, 2013 18:05
-
-
Save dualbus/7471482 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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