I have a question and here is what I am trying to do.
Generate an array of 20 random numbers between 1-100
Display them as generated
Sort them into descending order (Starting with the largest and going to the smallest
Display the results
I have started writing the code but I am not sure where to go from here.
If anybody can send me in the right direction it would be greatly appreciated.
Public Class Form1 Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged Dim x As Double Dim i As Integer Dim sortarray(20) Randomize() For i = 1 To 20 sortarray(i) = Rnd() * 100 Next For i = 1 To 20 ListBox1.Text.add(sortarray(i)) Next End Sub End Class