Imports System
Public Class exercise118
Private Shared Sub Main(ByVal args As String())
Dim data As Single() = {1.5F, 0.7F, 8.0F}
Dim max As Single = Maximum(data)
Console.WriteLine(max)
End Sub
Private Shared Function Maximum(ByVal list As Single()) As Single
Dim max As Single = -99999999.00F
For i As Integer = 0 To list.Length - 1
If i = 0 Then
max = list(i)
Else
max = If(max < list(i), list(i), max)
End If
Next
Return max
End Function
End Class