Skip to content

permutations

Vašek edited this page Feb 6, 2019 · 1 revision

permutations

This function returns the number of possible permutations

Syntax:

permutations(n,x)
Argument Description
int n The number of possible numbers
int x Length of row

Returns: int

Description:

A permutation is a number of possible arranging objects in a row. Number n represents the number of objects, and number x is a length of the row.

Example :

int value = pemutations(3,3);

So, when we have numbers 1, 2 and 3 (n = 3) we can assemble them in row (x = 3) - six different ways: (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), and (3,2,1). So the output ofthis function is 6.

Back to number_functions

Clone this wiki locally