17 lines
383 B
Plaintext
17 lines
383 B
Plaintext
Function dice5() As Integer
|
|
Return Int(Rnd * 5) + 1
|
|
End Function
|
|
|
|
Function dice7() As Integer
|
|
Dim As Integer temp
|
|
Do
|
|
temp = dice5() * 5 + dice5() -6
|
|
Loop Until temp < 21
|
|
Return (temp Mod 7) +1
|
|
End Function
|
|
|
|
Dim Shared As Ulongint n = 1000000
|
|
Print "Testing "; n; " times"
|
|
If Not(distCheck(n, 0.05)) Then Print "Test failed" Else Print "Test passed"
|
|
Sleep
|