A85: Re: Random Number


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

A85: Re: Random Number



if you want a random # (not an integer) do
rand->variable
this gives you a number between 0 and 1(but not equal to either). to get a
higher #, multiply the rand part by something.
3rand->variable   #'s between 0 and 3 (but not including)

for integers just add an int in front of it
int rand->variable    gives you 0
to get numbers between certain points the rule is
int (amount of numbers you want)rand+(start number)
			^
	for example, to get #'s between 10 and 20, do int 11rand+10	
the eleven comes from 20-10+1 (I forget why, but you add one)



----------
> From: WuTangK64@aol.com
> To: assembly-85@lists.ticalc.org
> Subject: A85: Random Number
> Date: Saturday, November 15, 1997 8:40 AM
> 
> I know this is a assembly language mailing list, but can anyone please
tell
> me how to do random number in TI-BASIC?