A86: Re: Re: Creating distinct random-integer lists using ASM or BASIC


[Prev][Next][Index][Thread]

A86: Re: Re: Creating distinct random-integer lists using ASM or BASIC




But to get a random list from any range, just do this:
:input "Minimum:",A    ;get input for a minimum value
:input "Maximum:",B    ;get input for a maximum value
:randint(A,B)->C           ;Get a random integer between min. and max.
:;put some code here to make your list
Hope this helps,
--------------
Jbrett
tbarwick@esn.net
http://ww2.esn.net/~tbarwick
I just added a TI-86 page, Check it out!!!
-----Original Message-----
From: Dux Gregis <assets@eden.rutgers.edu>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Friday, October 02, 1998 7:50 PM
Subject: A86: Re: Creating distinct random-integer lists using ASM or BASIC


>
>
>In basic you can use rand to get a number between one and 10, scan through
>the list and if your integer is there already, rerandomize the int and scan
>again.
>
>
>>
>>I'll try to be as clear as possible on this.
>>
>>Is there anyway somebody can create a list of random integers with an
>inputted
>>range?....sort of like putting the integers within the range in random
>order.
>>
>>For example, if you input 1 and 10.  It should generate a 10 item list of
>>numbers from 1 to 10 that are randomly placed something like:  {5, 3, 8,
9,
>2,
>>1, 7, 6, 4, 10}.
>>
>>If someone knows of any optimal way of programming this either in basic or
>>asm, preferably in asm then I'd greatly appreciate it.  this will come in
>use
>>when taking statistics courses since sometimes you have the assign the
>>experimental units random numbers in order to invalidate the lurking
>variable
>>of nonrandom assigning.
>>
>>Reply to this list.
>>
>>
>>Thanks,
>>
>>Mohsan H.
>
>