Mark Wickens

back to Command Reference

NCR

[All Models]

Purpose

Returns the combination 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.

See

Sample Program

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

Calculates 8C4 and displays the result.