Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: random number with range

by Polonius (Friar)
on Jun 01, 2006 at 17:37 UTC ( #553100=note: print w/replies, xml ) Need Help??


in reply to random number with range

Assuming you want an integer from 50 to 200 inclusive:

int (rand 151) + 50
Polonius

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://553100]
help
Chatterbox?
[Discipulus]: ..or suitable for the presidence ;=)
[Discipulus]: at Caput Mundi
[marto]: choroba, have you moved to Vietnam or just there for a while?

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2017-06-27 08:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (600 votes). Check out past polls.