You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :
intvalue=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.