Howto compute the factorial of x

前端 未结 7 1346
一生所求
一生所求 2020-12-20 00:05

how to get the value of an integer x, indicated by x!, it is the product of the numbers 1 to x.

Example: 5! 1x2x3x4x5 = 120.

相关标签:
7条回答
  • 2020-12-20 00:27

    how to get the som of an integer x, indicated by x!, is the product of the numbers 1 to x.

    Did you mean factorial of x ?

    Change d = d*a; to d = d*b inside the loop

    0 讨论(0)
提交回复
热议问题