I threw the code, but there is no right answer. Where can there be a mistake?)
#include "pch.h" #include <iostream> #include <cmath> using namespace std; double fx, f, fa, x, e; int main() { setlocale(LC_ALL, "rus"); cout << "Веедите x= "; cin >> x; cout << endl; cout << "Введите e= "; cin >> e; cout << endl; //x=1; //e=0.00001; fx = log(x); cout << endl << fx; while (abs(f) > e) { f = fx + x - 0.5; fa = 1 / x + 1; x = x - f / fa; cout << "x= " << x << "\n"; } cout << "Конечное решение х= " << x << "\n"; system("pause"); return 0; } 

ln(x)is 1 / x, calculated using the functionlog(x)from<cmath>... What else do you need? - Harry