Number guessing game Here we have a basic number guessing game again showing a random number example this time between 1 and 10. Here is our sample form , have a go. And here is the code for the form and the script .
And now for the script <% Dim intRandomNumber , intGuess 'get the number from the form intGuess = Int(Request.Form("guess")) 'generate a random number Randomize intRandomNumber = Int(5 * Rnd+ 1) 'display message based on correct guess or incorrect guess If intRandomNumber = intGuess Then Response.Write "Wa hay You guessed correctly