#include #include static long long unsigned c; static long double eps; static long double x; static long long unsigned n; int next() { long double p = x; x = (p + (c / p)) / 2; n++; return fabsl(x - p) >= eps; } void print() { printf("x_%llu=%Lf, ", n, x); } int main() { scanf("%llu %Lf", &c, &eps); x = c; n = 0; print(); while (next()) print(); print(); return 0; }