- Supports large numbers to be factorialized, above 22!
- Tested upto 1754! for 64 bit computers and upto 170! for 32 bit computers.
int i;
double fact = 1;
for(; i >= 1; --i) {
fact *= i;
}
printf("%.9g", fact);You can clone or download the repo, Once you have the file "factorial.c", You just need to compile and run it.
$ gcc factorial.c -o factorial
$ ./factorial
$ .\factorial.exe