#1 (permalink)  
Old 05-12-04, 02:13 PM
Marwan Marwan is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rnd()

How do I use this statment i dont know anything about it... and i have to make a stupid program using it!!!
Reply With Quote
  #2 (permalink)  
Old 05-14-04, 01:49 PM
Marwan Marwan is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
to be exact... this is the code WHAT THE HELL IT DO!!!


Dim introw As Integer
Dim intcolumn As Integer
Dim sngoutput As Single


For introw = 1 To 8
For intcolumn = 1 To 8
Randomize()
sngoutput = Rnd()
If sngoutput < 0.025 Then
Debug.Write("+K+")
Else
Debug.Write(" ")
End If


Next
Debug.WriteLine("")

Next

End Sub
Reply With Quote
  #3 (permalink)  
Old 06-02-04, 01:50 PM
Marcus2007 Marcus2007 is offline
Newbie Coder
 
Join Date: May 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb

Quote:
Originally Posted by Marwan
How do I use this statment i dont know anything about it... and i have to make a stupid program using it!!!

I can help u but u have to tell me what u need to do exactly.
I have some code from a slot machine program if that helps.

PictureBox1.Visible = False ' hide picture
Label1.Text = CStr(Int(Rnd() * 10)) ' pick numbers
Label2.Text = CStr(Int(Rnd() * 10))
Label3.Text = CStr(Int(Rnd() * 10))
' if any caption is 7 display picture and beep
If (Label1.Text = "7") Or (Label2.Text = "7") _
Or (Label3.Text = "7") Then
PictureBox1.Visible = True
Beep()
end if

Its a slot machine with 3 dials and they are randomized every spin.

I watch for your reply. -mark
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 02:21 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.