how to get the value of an integer x, indicated by x!, it is the product of the numbers 1 to x.
x
x!
Example: 5! 1x2x3x4x5 = 120.
5! 1x2x3x4x5 = 120.
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 ?
factorial
Change d = d*a; to d = d*b inside the loop
d = d*a;
d = d*b