Results 1 to 2 of 2

Thread: ***RESOLVED***math.random odd integers

Threaded View

  1. #1

    Thread Starter
    Addicted Member annie613's Avatar
    Join Date
    May 2003
    Location
    NY, NY
    Posts
    161

    ***RESOLVED***math.random odd integers

    is there a way to use Math.random and only request odd integers??? this is the code i use for n as any random number...

    Code:
    n = (int)Math.floor(Math.random()*50+1);

    but i want n to be odd each time...
    any suggestions
    thanks in advance annie
    Last edited by annie613; Aug 2nd, 2004 at 02:24 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width