Imports System
Public Module Module1
Public Sub Main()
'Declare Variables
Dim RandomClass As New Random()
Dim Dice As Integer
'Declare An Array Called Count That Contains 6 Elements
Dim Count(128) As Integer
'Initialise The Array
For i = 1 to 128
Count(i) = 0
Next i
'Throw The Dice 12000 Times
For i = 1 to 12000
'Generate A Random Number Between 1 And 6
Dice = RandomClass.Next(1,129)
'Now Increment The Relevant Count
Count(Dice) = Count(Dice) + 1
'Now Output the Counts
Console.writeline("Count of " & i & " s = " & Count(i) )
End Sub
End Module
'Pseudocode
'----------
'Generate Random Number String
'INTEGER: Dice
'INTEGER: Count[128]
'FOR i = 1 to 128
' Count[i] <-- 0
'NEXT i
'FOR i = 1 to 12000
' Dice <-- (1,129)
' Count[Dice] <-- Count[Dice] + 1
' OUTPUT("Count of " , i , " s = " , Count[i] )