#include<iostream.h> #include<conio.h> #define EPSILON 0.01 double fun(double X) { return X*X*X+X*X+9X; } double derive fun(double X) { return 3*X*X+2*X+9; } void newtonraphson(double X) { double h=fun(X)/drive fun(X); while (abs(h)>=EPSILON) { h=fun(X)/drive fun(X); X=X-h; } cout<<" The value of root "<< x; } void main( ) { X=200; newtonraphson (x); getch( ); }
GKVPAPER, Gurukul Kangri Vishwavidyalaya Papers, B.sc 1st year(l,ll Semester),2nd year(lll,lV Semester), 3rd year(V,Vl Semester)