RosettaCodeData/Task/Permutations/Julia/permutations-1.julia
2019-09-12 10:33:56 -07:00

14 lines
280 B
Text

using Combinatorics
term = "RCode"
i = 0
pcnt = factorial(length(term))
print("All the permutations of ", term, " (", pcnt, "):\n ")
for p in permutations(split(term, ""))
global i
print(join(p), " ")
i += 1
i %= 12
i != 0 || print("\n ")
end
println()