Computer Science, Mathematics, Learning, Learning To Code, Code.
fibonacci(int n) { if(n <= 1) { return n; } return fibonacci(n - 1) + fibonacci(n - 2); } As shown by the name of the function, we are simply calculating the n-th fibonacci number of the fibonacci sequence. If one is not familiar with the concept of recursion, this blob of code can look