CompuServe Messages

Manx help

    13-Sep-90 15:37:56
Sb: #364-Manx help
Fm: Mike Spille/Manx 71545,1466
To: Henry Williams 73527,1446
ran() should only be used if you need a floating point random number. If you're interested in integer stuff (which is the usual case), you say something like: foo () { int val; val = rand(); } rand() is similar to ran(), except that it returns an integer between 0 and 32767. If you need a range between say 1 and 50, you'd say something along the lines of: val = (rand() % 50) + 1; -Mike