English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

After the first digit, do the various digits appear with equal frequency.

2007-11-12 12:32:43 · 1 answers · asked by Roger Peters 2 in Science & Mathematics Mathematics

1 answers

Some random number generators require a seed number. Some take that seed from the clock.They are robust and there's no reason to expect one digit more than another.
Here are the results of 10 separate runs of a java program.
6596222023
8317486661
3912243815
4369293097
7033896006
3434863242
7400362197
8145867468
9445068141
8265172070
Code follows:
for(int w = 0 ; w < 10; w++){
double T = Math.random();
int randInt = (int)(10*T);
T = Math.random();
System.out.print(randInt);
}

2007-11-16 09:51:07 · answer #1 · answered by jsardi56 7 · 0 0

fedest.com, questions and answers