# Create Random "Even/Odd" Number within Range

## Recommended Posts

How do you generate even/odd random numbers?

ex) Generate "even" random number from (2-10)

resulting in random value from (2,4,6,8,or 10)

Has anyone done this before?

Thanks

Edited by Guest

##### Share on other sites

Try:

2 * Int ( Random * 5 ) + 2

http://fmforums.com/forum/showpost.php?post/299804/

##### Share on other sites

Thank You very much for the link.

min=3

max=13

result=odd number

2 * Int ( Random * 5 ) + 2

how to plot to that equation?

My goal is to create universal formula to generate even/odd number within range.

ex) min, max

resulted in "Even"/"Odd" number within specified range.

Edited by Guest

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×

×
×
• Create New...