Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > 5 random numbers (ASP)

Reply
Thread Tools

5 random numbers (ASP)

 
 
Charlotte
Guest
Posts: n/a
 
      12-21-2009

Hi,

I would like to have an ASP-code that generates five different random
numbers between 1 and 25

for one random number between 0 and 5, I use:
<%
Randomize
mynumber = INT((5)*RND())
%>

I search a code that gives me 5 different random numbers, something like
this:
1 - 4 - 9 - 17 - 23
or
8 - 14 - 18 - 21 - 25
or
.................
but not
2 - 7 - 7 - 14 - 24

who can help ?

thanks
Charlotte

 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      12-21-2009
Charlotte wrote on 21 dec 2009 in microsoft.public.inetserver.asp.general:
> I would like to have an ASP-code that generates five different random
> numbers between 1 and 25
>
> for one random number between 0 and 5, I use:
> <%
> Randomize
> mynumber = INT((5)*RND())


That would nog give you even one random number between 0 and 25 (incl?),
but between 0 and 4.

> %>
>
> I search a code that gives me 5 different random numbers, something like
> this:
> 1 - 4 - 9 - 17 - 23
> or
> 8 - 14 - 18 - 21 - 25
> or
> ................
> but not
> 2 - 7 - 7 - 14 - 24
>
> who can help ?


Most of us can, Charlotte.

Better show us what you have done so far, convincinhg us you are not trying
to have us do your school asignment (huiswerk).

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
Charlotte
Guest
Posts: n/a
 
      12-21-2009
> Better show us what you have done so far, convincinhg us you are not
> trying
> to have us do your school asignment (huiswerk).




solved (opgelost)
google: array shuffle ASP


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 4.10 Why aren't my random numbers random? PerlFAQ Server Perl Misc 0 04-27-2011 04:00 AM
FAQ 4.10 Why aren't my random numbers random? PerlFAQ Server Perl Misc 0 02-12-2011 11:00 PM
Math.random() and Math.round(Math.random()) and Math.floor(Math.random()*2) VK Javascript 15 05-02-2010 03:43 PM
How do I get a random number between two random numbers? Alex Untitled Ruby 11 11-16-2009 09:45 AM
random.random(), random not defined!? globalrev Python 4 04-20-2008 08:12 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57