June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -0,0 +1,32 @@
|
|||
Public Sub Main()
|
||||
Dim byToSort As Byte[] = [249, 28, 111, 36, 171, 98, 29, 448, 44, 147, 154, 46, 102, 183, 24,
|
||||
120, 19, 123, 2, 17, 226, 11, 211, 25, 191, 205, 77]
|
||||
Dim byCount As Byte
|
||||
Dim bSorting As Boolean
|
||||
|
||||
Print "To sort: -"
|
||||
ShowWorking(byToSort)
|
||||
Print
|
||||
Repeat
|
||||
bSorting = False
|
||||
For byCount = 0 To byToSort.Max - 1
|
||||
If byToSort[byCount] > byToSort[byCount + 1] Then
|
||||
Swap byToSort[byCount], byToSort[byCount + 1]
|
||||
bSorting = True
|
||||
Endif
|
||||
Next
|
||||
If bSorting Then ShowWorking(byToSort)
|
||||
Until bSorting = False
|
||||
End
|
||||
'-----------------------------------------
|
||||
Public Sub ShowWorking(byToSort As Byte[])
|
||||
Dim byCount As Byte
|
||||
|
||||
For byCount = 0 To byToSort.Max
|
||||
Print Str(byToSort[byCount]);
|
||||
If byCount <> byToSort.Max Then Print ",";
|
||||
Next
|
||||
|
||||
Print
|
||||
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue