long int too short

Is there anything else I can use that is bigger than long int?
try long long.
still too short, I want to calculate 15! up to 20!
You'll need to get a bignum library for that or make your own.
If you just want to calculate up to 20!, then a long long should be fine.

1
2
20!       = 2432902008176640000
LLONG_MAX = 9223372036854775807 // from limits.h 


So you've got approx 6800000000000000000 to spare.
Topic archived. No new replies allowed.