- #1
tandoorichicken
- 245
- 0
How do you use the pow function from math.h?
Here's how I've been using it and the compiler gives me trouble:
month_pay = price*i*pow(1.0 + i, (double)n);
This is the way it was written on the handout from our professor but he makes a lot of typos, so I want to make sure if this is the right way to use pow or not.
Here's how I've been using it and the compiler gives me trouble:
month_pay = price*i*pow(1.0 + i, (double)n);
This is the way it was written on the handout from our professor but he makes a lot of typos, so I want to make sure if this is the right way to use pow or not.