Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double accrueInterest(double *balanceAccrue, int periodsAccrue, double rateAccrue) {
- double a = 0.0;
- rateAccrue /= 100;
- a = *balanceAccrue*pow(1 + (rateAccrue/12), periodsAccrue); /* compound interest formula */
- a = a - *balanceAccrue; /*to get just interest not interest + initial amount */
- return a;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement