Anonymous user
Sort an integer array: Difference between revisions
m
→sort a list: added/changed some comments and whitespace.
m (→sort a list: used a smaller font for the output.) |
m (→sort a list: added/changed some comments and whitespace.) |
||
Line 1,767:
Bern= '1 -1 1 0 -1 0 1 0 -1 0 5 0 -691 0 7 0 -3617' /*" " Bernoulli " */
Perrin= 3 0 2 3 2 5 5 7 10 12 17 22 29 39 51 68 90 /*" " Perrin " */
list= Bell Bern Perrin
say 'unsorted =' list /*display what's being shown.*/
do j=1 for
@.j=word(list, j)
end /*j*/
call eSort
$=; do k=1 for #; $= $
end /*k*/
say ' sorted =' space($) /*display the sorted list. */
exit /*stick a fork in it, we're all done.*/
/*──────────────────────────────────────────────────────────────────────────────────────*/
eSort: procedure expose @.; parse arg N; h=
do while h>1; h= h %
end
return</lang>
{{out|output|text= when using the default internal inputs:}}
|