Is there a special formula for permutation
问题 Who can help me out with a QBASIC CODE to find the permutation of a given number. I'd really appreciate. I've tried writing some codes but it's not giving the required answer. 回答1: If by permutation you mean the factorial then the following is the code that you need. It will get an integer and compute its factorial. DECLARE FUNCTION Factorial (n) FUNCTION Factorial (n) IF n = 0 THEN Factorial = 1 ELSE Factorial = n * Factorial(n - 1) END IF END FUNCTION INPUT "PLEASE ENTER AN INTEGER", n