Ok, after I posted my last result, it came to my attention that I did the wrong assignment. Now I am really in need of help. THis is also a double arry assignment and I need help from anyone asap..please..The instructions are as follow:
I am to make modifications to the code below. The instruction further states that when the user clicks the Get Temperatures button, the button's Click event procedure should prompt the user to enter the highest and lowest temperatures for seven days. Store the temperatures in a seven-row, two-column Integer array. The first column should contain the highest temp, and the second column should contain the lowest temp. When the user clicks the Display High/low button, the button's Click event procedure should display the highest and lowest temperature contained in the array.
So, where is my starting point?
Private intTemps(9) As Integer
Private intHighSub As Integer = intTemps.Length - 1
Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
Private Sub btnGet_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnGet.Click
' gets the temperatures and stores them in the array
Dim strInputTemp As String
For intSub As Integer = 0 To intHighSub
strInputTemp = InputBox("Temperature " & intSub + 1, "Temperatures")
Integer.TryParse(strInputTemp, intTemps(intSub))
Next intSub
lblHighest.Text = String.Empty
lblLowest.Text = String.Empty
End Sub
Private Sub btnDisplay_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
' display the highest and lowest temperature
Dim intHigh As Integer
Dim intLow As Integer
intHigh = intTemps(0)
intLow = intTemps(0)
For intSub As Integer = 0 To intHighSub
If intTemps(intSub) > intHigh Then
intHigh = intTemps(intSub)
End If
If intTemps(intSub) < intLow Then
intLow = intTemps(intSub)
End If
Next intSub
lblHighest.Text = intHigh.ToString
lblLowest.Text = intLow.ToString
End Sub