#include <iostream>
#include <cmath>
using namespace std;

int main() {
    double c = 15.0;
    double eps = 0.001;
    double x = c; // początkowe przybliżenie

    while (true) {
        double next = 0.5 * (x + c / x);
        if (fabs(next - x) < eps)
            break;
        x = next;
    }

    cout << "Przyblizona wartosc sqrt(" << c << ") = " << x << endl;
    return 0;
}
