I want to define the following function:
where a,b are constant parameters (e.g 3,2)
using namespace std;
//Define function f(x)
double f(int a, int b, double x)
would this work?
Last edited on
Why dont you try compiling it?
I can see missing semi-colon in various places
Compiling it to be sure is your best bet, but yes, this looks like it should work (aside from the missing semi-colons)
also beware to compile with the -lm command since you're using math.h