Menu

rand()

2005-06-23
2012-09-26
  • Shlomo Ben-David

    Why doesn't it work ?

     
    • Wayne Keen

      Wayne Keen - 2005-06-23

      Brevity in a question is not neccessarily a good thing! Your question is kind of like calling up a mechanic, saying your car won't start, and asking what's wrong with it.

      The thread you posted directly over, and apparently did not look at (despite it proclaiming in all capital letters "FAQ - PLEASE READ BEFORE POSTING A QUESTION") has in its first section information about the "Basic 3" the information to include when asking a question - start by providing those 3 pieces of information.

      Wayne

       
    • tim

      tim - 2005-11-05

      a=rand() % (maxvalue+1);
      will give a random number from 0 to maxvalue

       

Log in to post a comment.