Quote:
|
Originally Posted by CmptrGk
the only reason i used the doubles was because the i wouldnt get any results for some larger numbers.
|
Depending on the computer/compiler, you can usually declare a variable as a "long int" or even as a "long long", which (again, depending on compiler) tends to be 64 bits. This is large. Very, very large. Also, if you add the word "unsigned" before int, it lets you use much bigger numbers (at the expense of not allowing numbers less than 0). So, for example, you could declare a variable as type "unsigned long int" and it should be plenty big for anything and everything you would ever want to take the factorial of.
-Rob