5 random numbers (ASP)

C

Charlotte

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
 
E

Evertjan.

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).
 
C

Charlotte

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top