Math.h help

...
Last edited on
1
2
3
double harmoni (int he1, int har){
    return (double (2)/((1/he1)+(1/har)) );
}

This will user integers for division. C++ will not computer decimals during integer division.

You said gmean does not work, but you did not share the code. How can we help with code you have not shown?
Thanks, I did figured it out.
Thanks for this reply, I couldn't get it as well :)
Topic archived. No new replies allowed.