Generate and display 5 random integers from 50 to 100
Imports System
Imports System.Globalization
Public Class MainClass
Public Shared Sub Main()
Dim rand As New Random()
Console.WriteLine("Five random integers between 50 and 100:")
For ctr As Integer = 0 To 4
Console.Write("{0,8:N0}", rand.Next(50, 101))
Next
End Sub 'Main
End Class
Related examples in the same category