mirror of
https://github.com/TheAlgorithms/C
synced 2025-04-22 05:06:12 +03:00
8 lines
120 B
C
8 lines
120 B
C
int fib(int N){
|
|
if(N == 0)
|
|
return 0;
|
|
if(N == 1)
|
|
return 1;
|
|
return fib(N - 1) + fib(N - 2);
|
|
}
|