Created
December 9, 2021 14:40
-
-
Save lopoc/891c6fd7f1ec66fd0529d26729ea3076 to your computer and use it in GitHub Desktop.
a kinky Fibonacci series n-th term calculator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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