Module Module1
Sub Main()
Dim arr(9) As Integer
Randomize()
For i As Integer = 0 To arr.Length - 1
arr(i) = Int(Rnd() * 100) + 1
Next
For Each number In arr
Console.WriteLine(number)
Next
Dim divisor = 2
Dim remainder As Integer
Dim boundary = Math.DivRem(arr.GetLength(0), divisor, remainder)
Dim arr1(boundary - 1 + remainder), arr2(boundary - 1) As Integer
Array.Copy(arr, 0, arr1, 0, boundary + remainder)
Array.Copy(arr, boundary + remainder, arr2, 0, arr.Length - boundary)
Console.WriteLine()
For Each number In arr1
Console.WriteLine(number)
Next
Console.WriteLine()
For Each number In arr2
Console.WriteLine(Number)
Next
End Sub
End Module
' run:
'
' 77
' 72
' 1
' 10
' 60
' 75
' 59
' 65
' 37
' 40
' 77
' 72
' 1
' 10
' 60
' 75
' 59
' 65
' 37
' 40