Date: Sun, 2 Feb 1997 09:31:26 -0600 (CST) From: Andrew Deren To: Terence Ramos cc: djgpp AT delorie DOT com Subject: Re: random numbers error in DJGPP In-Reply-To: <32F44A89.3142@ix.netcom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Try using random() instead of rand() On Sun, 2 Feb 1997, Terence Ramos wrote: > Hello... > > I have been having trouble to get DJGPP to give me random numbers. I am > using the function rand()... this is how my source looks like > > number = rand() % 100 + 1; > > that should give me a random number from 1 to 100 right? well i keep on > getting the same number which is 1. So i took out the + 1 part and now > i only get 0. whats wrong here? Any help would be appreciated... > > [Terence Ramos ] > [de-bug AT ix DOT netcom DOT com] >