Skip to content

Instantly share code, notes, and snippets.

@okaram
Created March 23, 2012 17:21
Show Gist options
  • Save okaram/2172948 to your computer and use it in GitHub Desktop.
Save okaram/2172948 to your computer and use it in GitHub Desktop.
Recursion Examples (public)
#include <iostream>
using namespace std;
int fac(int n) {
if(n<=0)
return 1;
else
return n*fac(n-1)
}
#include <iostream>
using namespace std;
int fac(int n) {
if(n<=0)
return 1;
else
return n*fac(n-1)
}
@okaram
Copy link
Author

okaram commented May 23, 2012

stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment