Skip to content

Instantly share code, notes, and snippets.

@lopoc
Created December 9, 2021 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lopoc/891c6fd7f1ec66fd0529d26729ea3076 to your computer and use it in GitHub Desktop.
Save lopoc/891c6fd7f1ec66fd0529d26729ea3076 to your computer and use it in GitHub Desktop.
a kinky Fibonacci series n-th term calculator
/*
* Author: lopoc
* Purpose: for fun.
* Language: C
*/
#include <stdlib.h>
int main(int n, char * m[]) {
if (n > 0)
n = -atoi(m[1]);
return n > -2 ? 1 : main(n + 1, 0) + main(n + 2, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment