Mark Wickens

NPR

Purpose

Returns the permutation nPr for the values of n and r.

Format

NPR         ( n value , r value )
              └──┬──┘   └──┬──┘ 
       Numeric expression  Numeric expression

Example

X = NPR(69, 20)

Parameters

Explanation

  1. Returns the permutation: nPr = n! / (n - r)!
  2. A fractional value as either n or r generates an error.

Sample Program

10  N=10 : P=5
20  X = NPR(N, R)
30  PRINT X

Calculates ₁₀P₅ and displays the result.