Mark Wickens

NCR

Purpose

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

Format

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

Example

X = NCR(70, 35)

Parameters

Explanation

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

Sample Program

10  N=8 : R=4
20  X = NCR(N, R)
30  PRINT X

Calculates ₈C₄ and displays the result.