Professional Documents
Culture Documents
Newton Raphson
Newton Raphson
#include<cmath>
double f(double x) {
double df(double x) {
int main() {
double y, eps;
int n;
cout << "Enter an initial approximation: ";
cin >> y;
cout << "Enter the maximum number of iterations: ";
cin >> n;
cout << "Enter the error tolerance: ";
cin >> eps;