Am 09.07.2009 um 13:20 schrieb Ghazal Mir:

> how can i generate random odd integers?

Something like: 2 * rand(6) + 1 ? The example will give you an odd  
number between 1 and 11 (both included). Adapt the number in rand as  
needed.

More details here http://ruby-doc.org/core/classes/Kernel.html#M005974

As a side note: Google is your friend.

Felix

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to