Question: please use cpp code In the main() function, prompt for the values of , , , and , and display the amount after each compounding

please use cpp code

In themain()function, prompt for the values of , , , and , and display the amount after each compounding period as follows:

Enter the principal, APR, # of compounding periods per year, and number of years: 1000.0 0.10 2 4

$1050 in 0.5 years

$1102.5 in 1 years

$1157.63 in 1.5 years

$1215.51 in 2 years

$1276.28 in 2.5 years

$1340.1 in 3 years

$1407.1 in 3.5 years

$1477.46 in 4 years

Some code suggestions:

  • A counter-based loop is needed that repeats times.
  • A variable calledgrowthshould be declared that starts off at 1.0 and is multiplied by each time through the loop. The value of is readily calculated from andgrowth.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!