Option Strict On
Module Module1
    Function f(ByVal x As Double) As Double
        Return 3 * Math.Log(x + 1) / (1 + Math.Log(x + 1))
    End Function
    Sub Main()
        Dim Tmax As Double = 300
        Dim T As Double
        Dim dT As Double = 50
        Dim l As Double = 0.1
        Dim H As Double
        Dim Hsum As Double
        Console.WriteLine(" Шаг интегрирования по t:  {0:f2}", l)
        Console.WriteLine()
        Console.WriteLine("        T        Cp           H(T)")
        Console.WriteLine(" ------------------------------------")
        For i As Integer = 0 To CInt(Tmax / dT)
            T = i * dT : Hsum = 0 : H = l / 2 * (f(0) + f(T))


            For j As Integer = 1 To CInt((T / l) - 1)
                Hsum = l * (f(j * l))
                H = H + Hsum
            Next j
            Console.WriteLine("  {0,8}     {1,-7:f5}     {2}", T, f(T), H)
        Next i
        Console.ReadLine()
    End Sub

End Module
