Sorting algorithms/Bogosort: Difference between revisions
Content added Content deleted
(c) |
m (→{{header|Oberon-2}}: lang tag) |
||
Line 464: | Line 464: | ||
=={{header|Oberon-2}}== |
=={{header|Oberon-2}}== |
||
{{Works with|Oxford Oberon-2 Compiler}} |
{{Works with|Oxford Oberon-2 Compiler}} |
||
< |
<lang oberon2>MODULE Bogo; |
||
IMPORT Out, Random; |
IMPORT Out, Random; |
||
Line 514: | Line 514: | ||
END; |
END; |
||
Out.Ln; |
Out.Ln; |
||
END Bogo.</ |
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. |