mirror of
https://github.com/TheAlgorithms/C.git
synced 2026-02-10 05:47:03 +00:00
9 lines
123 B
C
9 lines
123 B
C
int fib(int N)
|
|
{
|
|
if (N == 0)
|
|
return 0;
|
|
if (N == 1)
|
|
return 1;
|
|
return fib(N - 1) + fib(N - 2);
|
|
}
|