469,612 Members | 1,605 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

Function Problem - Bowling Game

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:)
3 Weeks Ago #1
0 3860

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

12 posts views Thread by Mark Constant | last post: by
5 posts views Thread by A_StClaire_ | last post: by
1 post views Thread by fowle040 | last post: by
19 posts views Thread by foolsmart2005 | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.