Skip to content

Instantly share code, notes, and snippets.

@LinuxDoku
Created May 14, 2013 21:12
Show Gist options
  • Save LinuxDoku/5579594 to your computer and use it in GitHub Desktop.
Save LinuxDoku/5579594 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int fak(int n);
void main() {
printf("%d\n", fak(3));
}
int fak(int n) {
if(n == 1) {
return n;
} else {
return n * fak(n - 1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment