I need to create two functions to determine the score of a frame of bowling using rnd to generate random numbers.
I have tried variations of the following:
Private Function Roll1()
Dim r1 As Integer
r1 = CInt(10 * Rnd())
Return r1
End Function
Private Function Roll2()
Dim r1, r2 As Integer
If r1 = Roll1() Then
r2 = CInt(10 * Rnd()) And
(r1 + r2 >= 10)
End If
Return r2
End Function
However, it keeps retiurning a value of 0, can someone please provide some guidance.
Thanks in advance:)
I have tried variations of the following:
Private Function Roll1()
Dim r1 As Integer
r1 = CInt(10 * Rnd())
Return r1
End Function
Private Function Roll2()
Dim r1, r2 As Integer
If r1 = Roll1() Then
r2 = CInt(10 * Rnd()) And
(r1 + r2 >= 10)
End If
Return r2
End Function
However, it keeps retiurning a value of 0, can someone please provide some guidance.
Thanks in advance:)
Comment