subject

#include using namespace std;

double f(double x)
{
return (double) (x*x*x) + (x*x) - 1;
}

double g(double x) //equation of x
{
return (double) sqrt(1/(1+x));
}

int main()
{
double x0, a, b, xn=1;
int iter = 0;
x0 = 0;
a = f(x0);

// finding interval
while(1)
{
x0++;
b = f(x0);

if(a*b < 0)
{
a = x0 - 1;
b = x0;
break;
}

a = b;
}

cout<<"The interval I = ["< 0.0001)
{
x0 = xn;
xn = g(x0);
iter++;

cout<<" "< }

cout<<"\n\nThe root of the equation x^3 + x^2 - 1 = 0 is "<
return 0;
}

Convert this code to c language

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:00
Our primary purpouse as electricians is to do wich of the following core concepts? a: install electrical components in a way they can be upgraded b: install electrical equiptment in a way that reduces heat c: install electrical systems in a safe manner d: only b and c
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
List the five on-board vehicle subsystems
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
In which job role will you be creating e-papers, newsletters and preiodicals
Answers: 1
You know the right answer?
#include using namespace std;

double f(double x)
{
return (double) (x*x*x)...
Questions
question
Mathematics, 25.02.2020 05:59
Questions on the website: 13722363