Message-ID: <004001bc6307$6bf0df00$8ef8c6c3@johan> From: "Johan Henriksson" To: Subject: Re: ** Random error ** Date: Sat, 17 May 1997 23:10:23 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Reply-To: djgpp AT delorie DOT com from Johan Henriksson, Sweden HTTP://come.to/jhewok | Primary mail: johan DOT he AT telia DOT com #UIN 12035895 Second: jhe75 AT hotmail DOT com Third: johan_he AT yahoo DOT com Leadprogrammer and FX-specialist at Real software http://come.to/real_software ************************************************************************* -----Original Message----- From: Börje Granberg Newsgroups: comp.os.msdos.djgpp To: djgpp AT delorie DOT com Date: Monday, May 17, 1999 7:29 PM Subject: SV: ** Random error ** >I tested it but there comes the same numbers evertime! > Japp, de missade några rader. Du måste ge ett startvärde till randomiseraren. Tiden funkar bra: #include Sen nånstans i början: srandom(time(NULL)); ps: Skaffa ICQ!!! > > > >Sean skrev i >diskussionsgruppsmeddelandet:373EC6D5 DOT BD3882E0 AT enter DOT net... >> "Börje Granberg" wrote: >> > >> > Can somebody tell how I do to set the variable "int i" to a random >number >> > from 1 to x? >> >> #include >> >> ... >> >> int i = rand() % x + 1; > > >