logo

Crowdly

Program bisectiei; #include <iostream> #include <iomanip> #include <math.h...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Program bisectiei;

#include <iostream>

#include <iomanip>

#include <math.h>

using namespace std;

a, b, c;

i, n;

double f(double x)

{

return pow(x,4)+2*x*pow(x,2)-x-1;

}

int main()

{

a = 0; b = 1; n = 16;

for (i = 1; i n; i++)

{

c = / 2;

cout << setprecision(8) <<"i=" << i << " x=" << c << "f(x)="<<f(c) << endl;

if (f(c) ) break;

else if (f(c) * f(a)) a = c; else b = c;

}

return 0;

}

More questions like this

Want instant access to all verified answers on moodle1.ceiti.md?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!