Option Strict On
Module Module1
    Dim p As Double = 2
    Const k As Double = -2.08
    Function f(ByVal x As Double) As Double
        Return ((p ^ 4) * 256 * (x ^ 5) / (1 - x) / ((4 * x + 1) ^ 4)) - 10 ^ k
    End Function
    Sub Main()
        Dim a As Double = 0
        Dim b As Double = 1
        Dim eps As Double = 0.000001
        Dim c As Double
        Do While Math.Abs(b - a) > 2 * eps
            c = (a + b) / 2
            If f(a) * f(c) < 0 Then
                b = c
            Else
                a = c
            End If
        Loop
        Console.WriteLine("При давлении {0} атм и lgКр = {1} {2}было получено {3:F2} (CH3)2C6H4", p, k, vbNewLine, c / (4 * c + 1) * 100)
        Console.ReadLine()
    End Sub

End Module
