Sorting algorithms/Bogosort: Difference between revisions

Content added Content deleted
(c)
Line 464: Line 464:
=={{header|Oberon-2}}==
=={{header|Oberon-2}}==
{{Works with|Oxford Oberon-2 Compiler}}
{{Works with|Oxford Oberon-2 Compiler}}
<pre>MODULE Bogo;
<lang oberon2>MODULE Bogo;


IMPORT Out, Random;
IMPORT Out, Random;
Line 514: Line 514:
END;
END;
Out.Ln;
Out.Ln;
END Bogo.</pre>
END Bogo.</lang>


Init initializes the array as 1 thru 10, then it is shuffled, and then the while loop continually shuffles until Sorted returns true.
Init initializes the array as 1 thru 10, then it is shuffled, and then the while loop continually shuffles until Sorted returns true.