Module Problem2 Sub Main() Dim sr As New IO.StreamReader("DATA2.txt") Dim sw As New IO.StreamWriter("OUT2.txt") 'if req'd: For i As Integer = 0 To 4 Dim tot As Integer = largest(sr.ReadLine()) sw.writeline(tot) Next sr.Close() sw.Close() End Sub Function largest(ByVal x As String) As Integer Dim total As Integer = 0 For j As Integer = 0 To x.Length - 1 Dim p As Integer = Integer.Parse(x.Chars(j).ToString) If Integer.Parse(x.Chars(j).ToString) > total Then total = Integer.Parse(x.Chars(j).ToString) End If Next Return total End Function End Module