You are viewing a single comment's thread. Return to all comments →
Kotlin
fun fib(n: Int): Int { return when (n) { 0 -> 0 1 -> 1 else -> fib(n - 1) + fib(n - 2) } }
Seems like cookies are disabled on this browser, please enable them to open this website
Fibonacci Numbers
You are viewing a single comment's thread. Return to all comments →
Kotlin