Distribution of Random Numbers : Random « Development « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » Development » RandomScreenshots 
Distribution of Random Numbers
 

Module Example
   Public Sub Main()
      Dim frequency(9As Integer
      Dim number As Double
      Dim rnd As New Random()

      For ctr As Integer = To 99
         number = rnd.NextDouble()
         frequency(CInt(Math.Floor(number*10))) += 1
      Next
      For ctr As Integer = frequency.GetLowerBound(0To frequency.GetUpperBound(0)
         Console.WriteLine(frequency(ctr))
      Next         
   End Sub
End Module

   
  
Related examples in the same category
1.Generate a Random NumberGenerate a Random Number
2.Random numberRandom number
3.Generating Random Numbers between the optional Low and High parameters
4.Returns a random number between the optional Low and High parameters
5.Random Class represents a pseudo-random number generator
6.Generate and display 5 random byte (integer) values
7.Generate and display 5 random integers
8.Generate and display 5 random integers between 0 and 100
9.Generate and display 5 random integers from 50 to 100
10.Generate and display 5 random floating point values from 0 to 1
11.Generate and display 5 random floating point values from 0 to 5
12.Create Random class, using the specified seed value.
13.Random.Next Method returns a nonnegative random number less than the specified maximum.
14.No bound random number
15.Generate random numbers with an upper bound specified
16.Generate random numbers with both bounds specified
17.Random.Next Method (Int32, Int32) returns a random number within a specified range.
18.20 random integers from 1000 to 10000
19.20 random integers from 1 to 10
20.Random.NextBytes fills the elements of a specified array of bytes with random numbers.
21.Random.NextDouble returns a random number between 0.0 and 1.0.
22.IPHostEntry: Internet host address information.
w_ww__.___j_a___v___a__2_s__.__c__o__m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.