i have not been able to calculate factorial of longer numbers as there is no data type available to store such big no.
Plz tell me how to print factorial of big nos.
i have not been able to calculate factorial of longer numbers as there is no data type available to store such big no.
Plz tell me how to print factorial of big nos.
long long int ... range -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
on most compilers written in the past 8 to 10 years long long int is 64bits.
For very large numbers you need bignum arithmetics, check out Arbitrary-precision arithmetic - Wikipedia, the free encyclopedia
And that is insufficient to represent 100! (which has a value of just under 1.0E158). That would need at least a 525-bit integral type.
That is why some big integer representation (typically implemented as an array of unsigned or unsigned long, and a set of functions to operate on that representation) is needed.