Untitled
unknown
plain_text
2 years ago
627 B
15
Indexable
// casat.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//
#include <iostream>
using namespace std;
int main()
{
double Eps, x0, x1, y, y2, y1, dx;
cin >> x0 >> Eps;
y = pow(x0 - 0.1, 4) + 0.1;
y2 = 12 * pow(x0 - 0.1, 2);
if (y * y2 > 0) {
do {
y = pow(x0 - 0.1, 4) + 0.1;
y1 = 4 * pow(x0, 3);
x1 = x0 - y / y1;
dx = abs(x1 - x0);
x0 = x1;
} while (dx > Eps);
cout << x0;
}
}Editor is loading...