Results 1 to 2 of 2

Thread: printing random numbers..

  1. #1
    gencoglu
    Guest

    printing random numbers..

    Helloi
    I want my codes to produce six numbers between 1-and 49 randomly..and print all the numbers in rows..(on a blank page)

  2. #2
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602
    <html>
    <head>
    <title>Numbers</title>
    <script>
    var numbers = new Array(6);
    var i;
    var numberString = '';

    function getNumbers(){
    for(i = 0; i<6; i++){

    numbers[i] = Math.round((Math.random()* 48) + 1);
    numberString += numbers[i] + ' ';
    }
    document.writeln(numberString);

    }
    </script>
    </head>
    <body ONLOAD = "getNumbers();">
    </body>
    </html>
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width