ASP & VBS
Randomize
'iRan ~ [0 - Max]
iRan = Int((Max + 1) * Rnd)
'iRan ~ [1 - Max]
iRan = Int(Max * Rnd) + 1
PHP
//$iRan ~ [$min - $max]
$iRan = rand($min, $max);
Javascript
//1 <= iRan <= 100
iRan = Math.ceil(100 * Math.random());
//0 <= iRan <= 10
iRan = Math.floor(11 * Math.random());
Title:
Generate random number
Description:
ASP & VBS Randomize 'iRan ~ [0 - Max] iRan = Int((Max + 1) * Rnd) 'iRan ~ [1 - Max] iRan = Int(Max * Rnd) + 1 PHP //$iRan ~ [$mi...
...
Rating:
4