Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1529

Random number generator

$
0
0
Here is a small program that demonstrate a random number generator. There are two buttons and a listbox. We can see the frequencies of each of 100 numbers (from 0 to 99). We produce 2000000 random numbers. With the left button is mine generator the other is the vb generator. In Ide vb generetor is faster, but in compiled code mine generator is 2 times quicker. Why? First I would like more span to the frequencies, and the function give a number form 0 to 9999. In mine computer needed 1 seconds for 2 million random numbers, and 2 seconds using the vb function.
Attached Files

Viewing all articles
Browse latest Browse all 1529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>