Message-ID: <000701be197f$f2d2e100$79f5ffc2@default> From: "=?iso-8859-1?Q?Lazer_---=A4---?=" To: "Djgpp mailing list" Subject: Randomizing Date: Thu, 26 Nov 1998 22:00:50 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0004_01BE1988.3AE538A0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Reply-To: djgpp AT delorie DOT com Denne opdelte meddelelse er i MIME-format. ------=_NextPart_000_0004_01BE1988.3AE538A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Would anyone show me how to use rand()!! I nede to get it to chose from 2 numbers i've tryed this: *********************************** #include int main() { int my_number; my_number=3Drand()%2; printf("%d", my_number); } *********************************** It always print 0 on the screen Thanks!! ---> Lazer ------=_NextPart_000_0004_01BE1988.3AE538A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Would anyone show me how to use = rand()!!
 
I nede to get it to chose from 2 = numbers
 
i've tryed this:
 
***********************************
#include <stdio.h>
 
int main()
{
int my_number;
my_number=3Drand()%2;
printf("%d", my_number);
}
***********************************
 
It always print 0 on the = screen
 
Thanks!!
 
---> = Lazer
------=_NextPart_000_0004_01BE1988.3AE538A0--