delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/28/08:50:08

From: rdebelj AT wt DOT com DOT au (Robert Debeljakovic)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: random number?
Date: Thu, 28 Aug 97 06:09:01 GMT
Organization: Evolution Software
Lines: 25
Message-ID: <5u35ct$upr$1@kurica.wt.com.au>
References: <33F3CA35 DOT 29B3 AT erols DOT com> <33F4D7FB DOT 74A2 AT cs DOT com>
NNTP-Posting-Host: dialup15.wt.com.au
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <33F4D7FB DOT 74A2 AT cs DOT com>, fighteer AT cs DOT com wrote:
>Matt McFadden wrote:
>Example code:
>#include <stdio.h>
>#include <stdlib.h>
>#include <time.h>
>
>int rolldice( int ndice, int nsides )


Hmmm...
I typed this one in, and the following happened:
How many dice? 1
How many sides 10
The result is -1892526920

That must have been one helluva roll eh?

Anyone know why I get this answer?
I have checked the code? Its fine! (what little there is!)

BaiBai

Rob.
West Oz

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019