alexoval Posted December 8, 2004 Posted December 8, 2004 I am trying to get display the highest number from the second column. I have trying different combination of code but I dont get the highest number. what can be a way to display the highest number for the second colum? here is the array: Dim intScores(,) As Integer = {{89, 98}, _ {78, 45}, _ {67, 89}, _ {90, 99}, _ {91, 70}, _ Quote
*Experts* Nerseus Posted December 8, 2004 *Experts* Posted December 8, 2004 Since this sounds like a homework assignment... Can you show us what code you've tried? Do you need help looping through the array, finding the max value, or displaying a value (display it *where*)? As you can see, there are many possible questions that need answering... -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
alexoval Posted December 8, 2004 Author Posted December 8, 2004 (edited) Since this sounds like a homework assignment... Can you show us what code you've tried? Do you need help looping through the array, finding the max value, or displaying a value (display it *where*)? As you can see, there are many possible questions that need answering... -nerseus Well my problem was to find the number inside the column of the array I was looping thought the array but was getting the wrong number. I also had it that when I was looping it was only getting the first number in the array and it was not going thought the array. So I tried this and place the value inside the label. For intHighRow = 0 To 5 'Search the array for the second column to find the higest number. If intScores(intHighRow, 1) > 98 Then Me.FinalLabel.Text = intScores(intHighRow, 1) Else intHighCount = intHighCount + 1 If intScores(intHighCount, 1) > 98 Then Me.FinalLabel.Text = intScores(intHighCount, 1) End If End If Next intHighRow Edited December 8, 2004 by alexoval Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.