FoxPro doesn't have any special factorial function, so you would have to write your own factorial function. It's fairly easy, for example:
function factorial
lparameters n
result = 1
for i = 1 to n
result = result * n
next
return result
If you have an older version of FoxPro, you may need to replace "lparameters" by "parameters".
Or even simpler, with recursion:
function factorial
lparameters n
return iif(n<=1, n, n*factorial(n-1))
Chat with our AI personalities
Kat
to find factorials you just multiply the factorial like this. for example 6! you would do 6x5x4x3x2. a little trick of mine is to multiply the previous factorial's answer by the factorial you are trying to make's number like this 6!=5! 5!=5x4x3x2 i hope this was helpful' Dayna,a 10 year old girl
factorial of -1
i need a pic of cuson
Factorial 6 = 720