Question: Create a C+ program that uses iteration to display the monthly values of a Certificate of Deposit (CD) account In IR Assignment 02 we explored
Create a C+ program that uses iteration to display the monthly values of a Certificate of Deposit (CD) account In IR Assignment 02 we explored Savings Account Growth which is similar. For a CD, there is no additional monthly deposit, only the initial deposit. Here is the formula newValue prevValue IprevValue monthlylnterestRate From main, prompt the user for the initial deposit amount, the annual interest rate and the maturity period. Velidate that all 3 inputs are positive, and exit the program if not. The maturity period is the number of months until the CD profits can be collected Pass the user input to a void function named printCdTable that will be responsible for the output The printCdTable function should use a counter-controlled loop to display a table where one column is the month and the other column is the value of the CD at the end of that month. The table should contain data for months 1 up through the maturity month Don't forget to convert the annual interest rate to a monthly rate as well as converting it to a decimal value Use the setw function to align the data in columns and also vertically align the decimal points Here is some sample output for an initial deposit of 10000, an annual interest rate of 5.75 and a maturity period of 18 months
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
