Results 1 to 2 of 2

Thread: [2008] Program a program with % rates?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2008
    Posts
    65

    [2008] Program a program with % rates?

    Hello! I wonder how to code a % rate!

    For example! that i want 30 % chance to get a MSGBOX! how i will write then?

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [2008] Program a program with % rates?

    VB.NET Code:
    1. Dim rand As New Random
    2. If rand.NextDouble <= 0.3 Then
    3.     MessageBox.Show("hello world")
    4. End If
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width