Re: A Little QBasic help
Irv wrote:
>
> RND * 2 - 1 MOD 10 returns a number between -1 and 0, replace with
>
> rand(2)-2 -- returns either 1 or 2, minus 2 equals either zero or minus
> 1
>
OOPS! Actually, that returns a real ranging from -1 to +1, but since it
is being assigned to an integer (thru addition), you can just as easily
use rand(3) - 2 -- which will be either 1,0,or -1.
At least, I think so. Does this program do some neat graphics?
Corrections encouraged.
Irv
|
Not Categorized, Please Help
|
|