5 random numbers (ASP)

Discussion in 'ASP General' started by Charlotte, Dec 21, 2009.

  1. Charlotte

    Charlotte Guest

    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
    Charlotte, Dec 21, 2009
    #1
    1. Advertising

  2. Charlotte

    Evertjan. Guest

    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)
    Evertjan., Dec 21, 2009
    #2
    1. Advertising

  3. Charlotte

    Charlotte Guest

    > 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
    Charlotte, Dec 21, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. globalrev
    Replies:
    4
    Views:
    742
    Gabriel Genellina
    Apr 20, 2008
  2. Alex Untitled
    Replies:
    11
    Views:
    649
    Giampiero Zanchi
    Nov 16, 2009
  3. PerlFAQ Server

    FAQ 4.10 Why aren't my random numbers random?

    PerlFAQ Server, Feb 12, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    210
    PerlFAQ Server
    Feb 12, 2011
  4. PerlFAQ Server

    FAQ 4.10 Why aren't my random numbers random?

    PerlFAQ Server, Apr 27, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    242
    PerlFAQ Server
    Apr 27, 2011
  5. VK
    Replies:
    15
    Views:
    1,121
    Dr J R Stockton
    May 2, 2010
Loading...

Share This Page