Module Tester
Sub Main()
Dim randomObject As Random = New Random()
Dim randomNumber As Integer
Dim output As String = ""
Dim i As Integer
For i = 1 To 20
randomNumber = randomObject.Next(1, 7)
output &= randomNumber & " "
If i Mod 5 = 0 Then ' is i a multiple of 5?
output &= vbCrLf
End If
Next
Console.WriteLine(output)
End Sub
End Module
|