samedi 21 février 2015

Although I've used Rnd Function, it doesn't TRULY give random numbers, how can I modify my existing code to gain randomly, distinct values?


Sub Monte_Carlo_Integration_Of_A_Function()
Dim x As Double, y As Double, num As Integer
Randomize()
Console.WriteLine()
Console.WriteLine("Monte Carlo Integration")
Console.WriteLine("XXXXXXXXXXXXXXXXXXXXXXX")
Console.WriteLine("Please Enter A Number?")
num = Console.ReadLine()
x = Rnd()
y = Rnd()
For i = 1 To num
Console.WriteLine(x)
Console.WriteLine(y)
Console.WriteLine()
Next


How do I modify this code to gain distinct, random numbers





Aucun commentaire:

Enregistrer un commentaire