#include <unistd.h>
#include <stdio.h>
int ft_fibonacci(int index)
{
if (index < 0)
return (-1);
if (index == 0)
return (0);
if (index == 1)
return (1);
return (ft_fibonacci(index - 1) + ft_fibonacci(index - 2));
}
int main(void)
{
printf("%d\n", ft_fibonacci(8));
return (0);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: