Skip to content

Instantly share code, notes, and snippets.

Created Nov 23, 2020
What would you like to do?
int get_term_fib(int n, int prev = 0, int curr = 1){
if (n == 0)
return prev;
if (n == 1)
return curr;
return get_term_fib(n - 1, curr, prev + curr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment