**Введите число: 10< /p>
Введите желаемое количество точных мест: 11
Ответ: 3,16228
**
Код: Выделить всё
// Find integer part of square root
int integerPart = findSqrt(n);
double finalAns = integerPart;
// Incrementally refine the result to the desired precision
double step = 0.1;
for (int i = 0; i < precision; i++) {
for (double j = finalAns; j * j
Подробнее здесь: [url]https://stackoverflow.com/questions/78668894/find-square-root-of-a-number-using-binary-search[/url]