Random Dice roller
this example shows how to generate random numbers and uses images of dice to simulate dice rolling .
Here is the code for the example
<%
'declare our variables
Dim intDie1 , intDie2 , intSum
'generate random numbers
Randomize
intDie1 = Int(6 * Rnd + 1)
intDie2 = Int(6 * Rnd + 1)
'display dice 1
Response.Write ""
Response.Write "You threw a " & intDie1 & "
"
'display dice number 2
Response.Write ""
Response.Write "You threw a " & intDie2 & "
"
If intDie1 = intDie2 Then
Response.Write "You threw a double well done" & "
"
End If
%>