Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer 4B in C++ 4.A. (10 points) You've recently started using a credit card and if you don't pay your credit card balance in

Please answer 4B in C++

image text in transcribed

4.A. (10 points) You've recently started using a credit card and if you don't pay your credit card balance in full each month, your credit card company will charge you interest every day on the remaining balance. You can calculate how much interest you pay per day by converting your APR (Annual Percentage Rate) to a Daily Percentage Rate by dividing it by 365. Multiply this daily rate with your current balance at the end of each day to get the daily interest charge. Add this charge to your balance the next day, a process called compounding. For instance, if your credit card has an APR of 15%, it will have a daily rate of .041096%. Thus, an outstanding balance of $1000 at the end of the day will become $1000.41096 the next day. This process occurs each day, such that at the end of the month, the initial $1000 balance becomes $1013 when interest charges are applied at 15% APR. Write an algorithm that calculates how many months it takes your balance to reach $1000 if the following are true: 1. Your credit card has an APR of 15% 2. You spend $200 on your credit card per month 3. You pay the minimum balance of $50 per month, but no more 4. Each month has 30 days 4.B. (5 points) Make changes to the above algorithm so that the user can input values for APR, spending each month, and how much they pay off each month. Is there a scenario where the algorithm will not terminate (maybe enter an infinite loop)? If so, make changes to the algorithm so that it always terminates

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions