"A. Ortiz-Tapia" <email@example.com> [mg4615] Matching random numbers writes
>>>>>>>>>>>> I have written the following program:
In:= (count = 0 ; Label[nextrandom]; pileup = pileup + 1; x = Random; y = Random; a = Round[100*x]; b = Round[100*y]; If[a== b,Return[x], Goto[nextrandom]]; If[count == 5000, Break]; Goto[nextrandom])
The purpose of this program is to produce two inpendent random numbers;match this two numbers by "converting" them to integers, then if theyare equal print either of them (I choosed x), *and* increment the valueof a variable, such that at the end I can have 5000 "matched" random numbers. The program, so far, gives out *only one number*.
I would like to have some comments. <<<<<<<<<<<<<<
Arturo, The following, written in a functional style more suited to Ma, seems to do what you want. I have replaced 5000 with 10.