Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,885 questions

51,811 answers

573 users

How to generate random float number in VB.NET

1 Answer

0 votes
Imports System

Public Class Program
	Public Shared Sub Main()
        Dim rand As Random = New Random()

        For i As Integer = 0 To 20 - 1
            Console.WriteLine(rand.NextDouble() * rand.[Next](1, 10))
        Next
    End Sub
End Class




' run:
'
' 4.51402892335971
' 3.55710707397997
' 0.871900904864027
' 2.57519934353195
' 4.83606709020029
' 2.22579497342268
' 1.83742765888452
' 1.29847379461791
' 0.756274914721155
' 6.90292518907363
' 7.12720608949997
' 0.330032099657707
' 3.63320278545525
' 2.51045567659217
' 0.495223010189469
' 0.838469307328793
' 0.380900172694074
' 6.65761197668389
' 0.903406879353992
' 0.632976271972515
'

 



answered Jun 1, 2022 by avibootz

Related questions

1 answer 139 views
1 answer 126 views
1 answer 73 views
1 answer 109 views
1 answer 129 views
1 answer 106 views
...