mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 05:10:55 +00:00
14 lines
177 B
Plaintext
14 lines
177 B
Plaintext
/* fibonacci sequence */
|
|
func fib(n) {
|
|
if n == 0
|
|
then 0
|
|
else if n == 1
|
|
then 1
|
|
else fib(n - 1) + fib(n - 2)
|
|
}
|
|
|
|
func main() {
|
|
result = fib(20)
|
|
println(result)
|
|
}
|