RosettaCodeData/Task/Permutations/Julia/permutations-1.julia

15 lines
280 B
Text
Raw Permalink Normal View History

2018-06-22 20:57:24 +00:00
using Combinatorics
2015-11-18 06:14:39 +00:00
term = "RCode"
i = 0
pcnt = factorial(length(term))
print("All the permutations of ", term, " (", pcnt, "):\n ")
for p in permutations(split(term, ""))
2019-09-12 10:33:56 -07:00
global i
2015-11-18 06:14:39 +00:00
print(join(p), " ")
i += 1
i %= 12
i != 0 || print("\n ")
end
println()