- #1
Freyster98
- 49
- 0
I am a beginner trying to enter a function prototype into C++. This is what I have entered...where am I going wrong?
double f(double x)
{
return 5*pow(x,3)-3*pow(x,2)+2*x+1;
}
I would like to be able to enter something like f(2.4) later in the code, and have it calculate the value using this function. How would I do this?
f(x)=5x3-3x2+2x+1
double f(double x)
{
return 5*pow(x,3)-3*pow(x,2)+2*x+1;
}
I would like to be able to enter something like f(2.4) later in the code, and have it calculate the value using this function. How would I do this?
f(x)=5x3-3x2+2x+1