Write a function that computes interest on a credit card account balance. The fu
ID: 3640465 • Letter: W
Question
Write 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 forget to compound the interest-that is, to charge interest on the interest due. The interest due is added onto the balance due, and the interest for the next month is computed using this larger balance. Embed the function in a program that reads the values for the interest rate, initial account balance, and number of months, then outputs the interest due. The program should allow the user to repeat the calculation until the user said he or she wants to end the program.Explanation / Answer
PS: Please rate the answer. Dont have visual studio. But this should work on it. Also I'm not sure how you are calculating interest. For 1000$, interest rate at 10%, for 3 months - Total interest is 341$. This is how I'm calculating. #include using namespace std; double calculateInterest(double initial_balance, double rate, int months) { double bal = initial_balance; double interest=0; for(int i=0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.