Hello, I am really confused as to how to start my project that I was given for my C++ course.
The instructions are:
Write a function declaration for a function that computes interest on a credit card account balance. The function takes arguments for the initial balance, the monthly interest rate, and the number of months for which interest must be paid. The value returned is the interest due. Do not forgetto compound the interest- that is, to charge interest on the interest due. This interest due is added into the balance due, and the interest for the next month is computed using this larger balance. Use a while loop. Embed the function in a program that reads the values for the interest rate, initial account balance, and number of months, then outputs ths interest due. Embed your function definition in a program that lets thge user compute the interest due on the credit account balance. The program should allow the user to repeat the calculation until the user said he or she wants to end the program.
The information that I am given through my instructor is:
Read the description carefully, insure that you allow the user a choice to run the program or exit.
The function prototype is:
double interest (double initBalance, double rate, int months);
Your initial output to the user should be something like this:
Credit card interest
Enter: initial balance, monthly interest rate as
a decimal fraction, e.g. for 1.5% per month write 0.015
and the number of months the bill has run.
I will give you the interest that has accumulated.
100 .1 2
Interest accumulated = $21.00
Y or y repeats, any other character quits
y
Credit card interest
Enter: initial balance, monthly interest rate as
a decimal fraction, e.g. for 1.5% per month write 0.015
and months the bill has run.
I will give you the interest that has accumulated.
100 .1 3
Interest accumulated = $33.10
Y or y repeats, any other character quits
n
Therefore, I am confused as to how to start with the function prototype that he gave me to start with...
double interest (double initBalance, double rate, int months);
Is there a possibility that anyone can lead me in the right direction to start with?
Thank you very much,
Debbie Bremer