| delorie.com/archives/browse.cgi | search |
| From: | "Börje Granberg" <borje DOT granberg AT ebox DOT tninet DOT se> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | SV: ** Random error ** |
| Date: | Sun, 16 May 1999 18:55:58 +0200 |
| Organization: | Telenordia |
| Lines: | 20 |
| Message-ID: | <7hpfnb$p1d$1@zingo.tninet.se> |
| References: | <7hmakj$t6h$1 AT cubacola DOT tninet DOT se> <373EC6D5 DOT BD3882E0 AT enter DOT net> |
| NNTP-Posting-Host: | du160-148.ppp.algonet.se |
| X-Trace: | zingo.tninet.se 926958123 25645 195.100.148.160 (17 May 1999 16:22:03 GMT) |
| X-Complaints-To: | abuse AT algo DOT net |
| NNTP-Posting-Date: | 17 May 1999 16:22:03 GMT |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Newsreader: | Microsoft Outlook Express 5.00.2014.211 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2014.211 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
I tested it but there comes the same numbers evertime! Sean <sproctor AT enter DOT net> 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 <stdlib.h> > > ... > > int i = rand() % x + 1;
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |