Computers and Technology, 03.09.2021 15:50 sophiat17
#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
Answers: 2
Computers and Technology, 21.06.2019 20:30
What important technology has done the most to allow a businesses a chance to compete with larger international companies
Answers: 1
Computers and Technology, 22.06.2019 09:30
Is a string of code written to hurt others by damaging or destroying
Answers: 1
Computers and Technology, 22.06.2019 19:10
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
Computers and Technology, 23.06.2019 10:00
Whats three fourths of 15(this is supposed to be in math but i clicked too fast)
Answers: 1
#include
using namespace std;
double f(double x)
{
return (double) (x*x*x)...
double f(double x)
{
return (double) (x*x*x)...
Health, 30.11.2020 22:30
Mathematics, 30.11.2020 22:30
Chemistry, 30.11.2020 22:30
History, 30.11.2020 22:30
English, 30.11.2020 22:30
Biology, 30.11.2020 22:30