subject

Now write a program that calculates the minimum fixed monthly payment needed in order pay off a credit card balance within a user defined number of months. we will not be dealing with a minimum monthly payment rate.
take as  input()  the following floating point numbers:
the outstanding balance on the credit cardannual interest rate as a decimalthe number of to pay off the debt
print out the fixed minimum monthly payment, number of months (at most the number of user defined months  and possibly less than that) it takes to pay off the debt, and the balance (likely to be a negative number).
assume that the interest is compounded monthly according to the balance at the start of the month (before the payment for that month is made). the monthly payment must be a multiple of $10 and is the same for all months. notice that it is possible for the balance to become negative using this payment scheme. in short:
monthly interest rate  = annual interest rate / monthschosen
updated balance each month  = previous balance * (1 + monthly interest rate) – minimum monthly payment
test case 1
> > >
enter the outstanding balance on your credit card:   1200
enter the annual credit card interest rate as a decimal:   .18
enter the number of months have the debt paid off by:   12
result
monthly payment to pay off debt in 1 year: 120
number of months needed: 11
balance: -10.05
> > >
test case 2
> > >
enter the outstanding balance on your credit card:   32000
enter the annual credit card interest rate as a decimal:   .2
enter the number of months have the debt paid off by:   24
result
monthly payment to pay off debt in 1 year: 1480
number of months needed: 24
balance: -88.92
> > >
hints
start at $10 payments per month and calculate whether the balance will be paid off (taking into account the interest accrued each month). if $10 monthly payments are insufficient to pay off the debt within a year, increase the monthly payment by $10 and repeat.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 16:30, ahmedislife
Select the correct answer. larry finds it easy to run legacy programs and applications in a virtualized environment. how does the virtualization provider make this possible? a. combines workloads of several underutilized servers to fewer machines b. installs and runs different versions of an operating system on the same computing device c. moves virtual machines from one server to another server at a different location d. streamlines and automates management tasks
Answers: 1
image
Computers and Technology, 22.06.2019 18:00, crimhill
When is it appropriate to use an absolute reference
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, genyjoannerubiera
In which view can you see speaker notes?
Answers: 1
image
Computers and Technology, 25.06.2019 08:20, jake2124
With technology, information is sent to users based on their previous inquiries, interests, or specifications.
Answers: 2
You know the right answer?
Now write a program that calculates the minimum fixed monthly payment needed in order pay off a cred...

Questions in other subjects:

Konu
Mathematics, 15.05.2021 03:40
Konu
Mathematics, 15.05.2021 03:40