Re: Using rand problem

2004-10-28 Thread Gunnar Hjalmarsson
Jeff Borders wrote: I've written a simple quiz program and I've run into a problem with rand and the integer it returns. It seems that it will eventually choose either 0 or n+1 which blows up my array. I want to make sure it chooses from the entire pool of questions. ie. Don't skip the first and

RE: using rand

2001-10-02 Thread Jeff 'japhy' Pinyan
On Oct 2, Bob Showalter said: >> -Original Message- >> From: eric [mailto:[EMAIL PROTECTED]] >> >> show how to creat a random number inthe following range: >> 5 to 15 >> -10 to 20 >> >> the documentation for rand and srand are not too useful. > >Well, they're extremely useful in telling

RE: using rand

2001-10-02 Thread Bob Showalter
> -Original Message- > From: eric [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 02, 2001 4:12 AM > To: [EMAIL PROTECTED] > Subject: using rand > > > i'm taking an intro to programming with PERL class. one of > the problems > asks us to do the following: > show how to creat a rand