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, 23.06.2019 04:00
Laire writes a letter to her grandmother, in which she describes an amusement park she visited last week. she adds pictures of that place in her letter. which feature of a word processing program will claire to remove unwanted parts of the pictures?
Answers: 3
question
Computers and Technology, 24.06.2019 09:00
Why might you chose to crest a function resume
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
In a home that has 120 v service, there is an electric appliance that has a resistance of 12 ohms. how much power will this appliance consume? a. 10 w b. 120 w c 1200 w d. 1440 w
Answers: 1
question
Computers and Technology, 25.06.2019 17:00
2. name the organization that works with small businesses to them grow into successful businesses.
Answers: 1
You know the right answer?
#include using namespace std;

double f(double x)
{
return (double) (x*x*x)...
Questions
question
Mathematics, 03.11.2020 19:40
question
Mathematics, 03.11.2020 19:40
question
Mathematics, 03.11.2020 19:40
Questions on the website: 13722362