Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
8
Task/Knuth-shuffle/Phix/knuth-shuffle.phix
Normal file
8
Task/Knuth-shuffle/Phix/knuth-shuffle.phix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
sequence cards = tagset(52)
|
||||
puts(1,"Before: ") ?cards
|
||||
for i=52 to 1 by -1 do
|
||||
integer r = rand(i)
|
||||
{cards[r],cards[i]} = {cards[i],cards[r]}
|
||||
end for
|
||||
puts(1,"After: ") ?cards
|
||||
puts(1,"Sorted: ") ?sort(cards)
|
||||
Loading…
Add table
Add a link
Reference in a new issue