'Visual Basic 2010 Inleiding Arrays Arrays Module Exercise2Solution Sub Main() Console.Write("Count : ") Dim count As Integer = Console.ReadLine() Dim upperbound As Integer = count - 1 ' Dim values(upperbound) As Integer Dim index, highestValueIndex As Integer ' For index = 0 To upperbound Console.Write("Value " & (index + 1) & " : ") values(index) = Console.ReadLine() If values(highestValueIndex) < values(index) Then highestValueIndex = index End If Next ' Console.WriteLine("Highest Value : " & values(highestValueIndex) & _ " ( element " & (highestValueIndex + 1) & _ " at index " & highestValueIndex & " )") ' Console.ReadLine() End Sub End Module 'Bezoek www.vbvoorbeelden.be voor meer Visual Basic voorbeelden. 'Copyright - De Wolf / vbvoorbeelden - 2003-2011 - Alle rechten voorbehouden.