Files
LXC/examples/Fib.lx
2025-08-04 13:16:08 +01:00

16 lines
209 B
Plaintext

func<int> fib(int num)
{
# Base cases #
if (n == 0) { return 0 }
if (n == 1) { return 1 }
# RECURSION BABYYYY #
return fib(n - 1) + fib(n - 2)
}
func<int> main()
{
int res = fib(8)
return res == 21
}