I am wanting to create a dice roller so that the user can choose a number of sides on a dice and it will randomise the response, My current code chucks out the same number all of the time.
Sub rollDie(ByVal sides As Integer)
Dim rand As Single = Rnd()
For cnt As Integer = 1 To sides
If rand < cnt / sides Then
diceRoll = cnt
Exit For
End If
Next
Console.WriteLine("You rolled a {0} sided die which landed on {1}", sides, diceRoll)
End Sub