function

Hello there, can someone help with this question?

Using function, write a complete C++ program to print out the result of the following equation : x2+5/2 y
you have done much more complex tasks already.
double f(double x, double y) {return 2*x+2.5*y;}
if "x2" means "x squared", do x*x
It's not an equation (no equals sign). It's an expression.
Topic archived. No new replies allowed.