Created
March 1, 2009 19:44
-
-
Save icco/72453 to your computer and use it in GitHub Desktop.
Recursive Fibinocci Sequence in C
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
void doWork(int a1,int a2,int n) | |
{ | |
int a3 = 0; | |
if(n <= 2) | |
{ | |
return; | |
} | |
else | |
{ | |
a3=a1+a2; | |
doWork(a2,a3,n-1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment