Created
October 15, 2017 15:57
-
-
Save avelino/f2ccbba0573dbbf80dbc1cf955d49b7d to your computer and use it in GitHub Desktop.
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
#include <stdio.h> | |
int fac(int); | |
int fac(int n) { | |
if (n == 0) { | |
return 1; | |
} | |
return n * fac(n - 1); | |
} | |
main() { | |
int i, j; | |
int t = 0; | |
for (j = 0; j < 100000; j++) { | |
for (i = 0; i <= 7; i++) { | |
t += fac(i); | |
} | |
} | |
printf("total: %d\n", t); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment