Hi,I want to make a small program with simulating the random event as be throwing a coin. The follwoing is my code:
Dim P as single
Dim n as long, m as long
For q = 1 to 100
P = Rnd
If p<0.5 Then
n = n +1
Label1.Caption = n 'n is number that coin heads after it fall down
Else
m = m +1
Label2.Caption = m
End If
Next q
But both sides(front and back) of a coin are equal only q is less than 100.Why? Thanks a lot.