From: neiled AT clara DOT net (Neil Edwards) Newsgroups: comp.os.msdos.djgpp Subject: Re: Random Message-ID: <3721e674.2305619@news.clara.net> References: X-Newsreader: Forte Agent 1.5/32.452 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 17 Date: Sat, 24 Apr 1999 15:47:11 GMT NNTP-Posting-Host: 195.8.88.62 X-Complaints-To: abuse AT clara DOT net X-Trace: mors.clara.net 924968831 195.8.88.62 (Sat, 24 Apr 1999 16:47:11 BST) NNTP-Posting-Date: Sat, 24 Apr 1999 16:47:11 BST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Sat, 24 Apr 1999 17:23:50 +0200, "Anders Pedersen" wrote: >Will somebody please show me how to get an random number between a and b? > rand() % b so it can be modified to put limits on it i.e. from 50 - 100 rand() % 50 + 50 so if its number is 50 then 50 + 50 is 100 if its 2 then 50 + 2 is 52, you get the idea! - Neil Edwards