Skip to content

Instantly share code, notes, and snippets.

@DaviRamosAndrade
Last active March 2, 2018 22:56
Show Gist options
  • Save DaviRamosAndrade/1975cee1578796d35e6465ce8ae8cff0 to your computer and use it in GitHub Desktop.
Save DaviRamosAndrade/1975cee1578796d35e6465ce8ae8cff0 to your computer and use it in GitHub Desktop.
int fibonacci(int n)
{
return abs(n) > 1 ? fibonacci(n - 1) + fibonacci(n - 2) : 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment