Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myarray(10) As String
myarray(1) = 6124
myarray(2) = 34
myarray(3) = 12
myarray(4) = 456
myarray(5) = 21234
myarray(6) = 45
myarray(7) = 6623
myarray(8) = 6654
myarray(9) = 72
myarray(10) = 38
Dim times As Integer
Dim StoreAnswer As Integer
Dim i As Integer
Label1.Text = ""
times = Val(TextBox1.Text)
For i = 1 To 10
StoreAnswer = myarray(1) * times
myarray(i) = StoreAnswer
Label1.Text = (times & "" & i & "" & myarray(i))
Next i
End Sub
End Class
this is the code of mine and i would like to change the multiplication part and to replace it with a script that it will return the biggest num in the array (for example if the user input 2 the array must return 4).
Last edited by stevereimo; March 4th, 2010 at 12:59 PM..
|