Cannot calculate factorials bigger than 20! ! How to do so?

后端 未结 7 508
清歌不尽
清歌不尽 2020-12-03 08:16

I am using unsigned long long integer format in order to calculate big factorials. However my code fails at some point can you have a look at it? Actually it is part of a la

7条回答
  •  时光说笑
    2020-12-03 08:37

    factorial(25) should give the result 18,446,744,073,709,551,615 which is larger than the range of unsigned long long Data Type Ranges

提交回复
热议问题