1
2
3
4
5
6
7
8
9
fun fib(n) {
  if (n == 2) {
    return 2;
  } else {
    return n * fib(n - 1);
  }
}

print fib(5);