Permutations: Difference between revisions
→{{header|Ring}}
Line 6,672:
// Ask User for number of digits to permutate
n = number(n)
x = 1:n // array
count = 0
? "Exiting of the program... "
//======================
Line 6,691:
for j=1 to k-1
return 1
Line 6,701:
Func nPermutation(k, n)
▲ if(k=n)
▲ See nl
▲ for i= 1 to n
See " "+ x[i]
See " "+ (count++)
ok
▲ next
return
|