Dim buf as string

Dim i as integer

Dim prob(0 to 4) as integer

Dim total as integer

Dim nums(0 to 4) as integer

Dim c As Integer

Dim min_num As Integer

Dim max_num As Integer

For t = 1 to X ' CHANGE X TO NUMBER OF TIMES YOU WANT TO DO RANDOMIZE TEST

min_num = 1

max_num = 10

For i = 1 to 5

Randomize

nums(i) = min_num + Int(Rnd() * (max_num - min_num))

total = total + nums(i)

next i

For i = 1 to 5

prob(i) = c / total

buf = buf & prob(i) + " "

next i

buf = buf & vbcrlf

next t

Open "C:\Result.txt" for binary as #1

Put#1, , buf

Close#1