using System;
class Program
{
static void Main(string[] args)
{
double a = 3.0;
double b = 12.0;
double e = 0.001;
double f(double x)
{
return 3 * Math.Pow(x ,2) -12 * x ;
}
while (Math.Abs(a - b) / 2 > e)
{
double c = (a + b) / 2;
if (f(a) * f(c) < 0)
b = c;
else
a = c;
Console.WriteLine(c);
}
Console.WriteLine($"Приближённый корень: {(a + b) / 2}");
}
}