How do i write this equation for C++?

BMI = 703*weight / height^2

how i thought to write it was:

 
(703 * getWeight / pow(getWeight, 2.0)


which is wrong.

Any help with this would be great please.
getWeight, is that a method?
And you're using getWeight for both weight and height?!
Sorry for the typo it should be
 
(703 * getWeight / pow(getHeight, 2.0)


And both getWeight and getHeight are variables for entering in the console.

(I am in intro to C++ class and dont get the equations)
Ok, that acually works now, I had it actually written as above with getWeight twice, thanks for pointing that out liuyang
Topic archived. No new replies allowed.