Is this code working cuz I tried it and it's not !?
Did you try the code ? It's working fine ( no overflow ) but it's also limited. I didn't say that it's not. I wanted to write a code which...
the approximation above was for 1000!
Oh .. :) it's calculating ... as you can see .. :) but you need to put the result into some data type which can hold this large number. Usually...
And Sterling's approximation is : n! ~ e^(-n)*n^n*Sqrt(2*PI*n)
Yes, but I wanted the full and correct result, not only an approximation. Here is my result ( the factorials from 1 to 1.000 ) : 1!= 1...
Here it is. The factorial of the numbers from 1 over to 1000 in 51 seconds. #include <stdio.h> #include <conio.h> #include <time.h> void...
Yes but it prints on the screen the factorials in rows from 1 to a value . Here is the new version which prints the results into a file:...
I made it but I don't really like it cuz` it's slow. It took about 6-7 minutes waiting for the result of " 1000! ". #include <iostream.h>...
Yes, it has, but i'm thinking on an algorithm which not calculates the result,but it generates it into a vector or a list. For example you can get...
Everything looks good and nice but what's if you want to calculate " 1000! " or the factorial of greater values ? :) The " unsigned int " type can...
Separate names with a comma.