The Fibonacci sequence is a sequence where the next term is the sum of the previous two terms. The first two terms of the Fibonacci sequence are 0 followed by 1.
For example,
We have provided the partial judge code (13061.c) below for you.
All you need to do is complete the int fib(int n) function and submit it to NTHU Online Judge System.
int fib(int n){
...
...
}
Attention: Using recursion to solve this problem.
Given an integer n, where n >= 0
Print out the F0 to Fn