#include <iostream> #include <cmath> using namespace std; int main() { double fx0, f1x0, x0, x1, a, h, fxh, fxhh ; x0=1 ; h=0,000000000001; // do numerycznego obliczenia pochodnej fxhh=(((x0+h)*(x0+h))/2)-2 ; fxh=(((x0-h)*(x0-h))/2)-2 ; f1x0=(fxhh-fxh)/2*h; fx0=((x0*x0)/2)-2 ; for(int i=0; i<=2; i++) { x1=x0-(fx0/f1x0) ; x0=x1 ; } cout << x1 << endl; cin >> a; //musiaウem cos dac, aby sie nie zamykal return 0; }
kowljankowljan