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.
int factorial(int x) { int f; if (x == 0) { f = 1; } else if (x > 0) { f = x*factorial(x-1); } return f; } int main() { int n = 0; cout << factorial(n); return 0; }