Permutations/Rank of a permutation: Difference between revisions

m (→‎{{header|REXX}}: added/changed comments and whitespace, used a template for output, changed wording in the REXX section header, changed program to also show a particular permutation rank.)
Line 1,564:
a[first] = a[last]
a[last] = temp
first += first + 1
last -= last - 1
end
</lang>
2,468

edits