hey all. i need a little help. i want to separate out the even and odd numbers from a random number.
example:
say you have the number 10, i want to stick all the odd
numbers upto 10 into an array or something where i can give each one a value, and do the same for the even numbers.
--
heres another way of thinking of it: i want to take a random number and for all the even numbers upto that random number, i want to assign the value "right" and for all the odd numbers i want to be called "left." then i want to randomly choose from the "right" numbers and from the "left" numbers.
or think of it in the context of the whole script idea:
i want to make a script that takes a users input of a number, takes that number devides it by a random number. then it from that same number that was used to devide the user input and assigns the values of "left" and "right" to those.
ok this next part maybe a little confussing:
the ultimate output would look something like this:
(and for sake of simplicity im going to use the numbers 4000 as the user input and 4 as the random number.
-- start --
4000
1000
left
1000
left
1000
right
1000
right
--- end --
but in a more random kind of way. if anybody understands any of this, could you please offer some advice. thanks.