Imports System
Public Class Program
Public Shared Function RandomFloat(ByVal min As Single, ByVal max As Single) As Single
Dim random As System.Random = New System.Random()
Dim d As Double = (random.NextDouble() * (max - min) + min)
Return CSng(d)
End Function
Public Shared Sub Main()
Console.WriteLine(RandomFloat(20, 30))
Dim random As System.Random = New System.Random()
For i As Integer = 0 To 5 - 1
Console.Write((random.NextDouble() * (32 - 25) + 25) & ", ")
Next
End Sub
End Class
' run:
'
' 24.72304
' 28.3061295306804, 27.6442494469901, 27.1661639721907, 30.2325565736892, 27.5743513054095,
'