' Visual Basic 2008 9.0 .NET Examples - Introduction to 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 ' Visit www.studyvb.com for more examples. Copyright 2003-2008 De Wolf.