Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Entrepreneurship

Authors: Andrew Zacharakis, William D Bygrave

5th Edition

9781119563099

Students also viewed these Programming questions

Question

=3/What financial product can a greenshoe be compared to?

Answered: 1 week ago