Previous: 3.8 Exercises
Up: 3 Designing Programs Top Down
Previous Page: 3.8 Exercises
C = (F - 32) * 5.0 / 9.0
acc_amount = acc_amount + acc_amount * annual_interestUse a function that returns the accumulated value given the amount, interest, and years. The prototype is:
float calc_acc_amt(float acc_amount, float annual_interest, int years);
cum_prod = cum_prod * i;The initial value of the cumulative product should be 1 so the first multiple accumulates correctly.