Question: Programming Task: Loan Calculator In this task, you will write a simple loan repayment calculator. In order to complete this task, you will need to

Programming Task: Loan Calculator

In this task, you will write a simple loan repayment calculator. In order to complete this task, you will need to prompt the user for the following information:

Principle (i.e. total loan amount, in dollars)

Annual interest rate (in percent)

Loan duration (in years)

Given this information, you can then begin your calculations:

monthly interest rate(MIR) = (annual interest rate/12)*(1/100)

The first step is to convert the annual (yearly) interest rate into a monthly interest rate (MIR) by dividing by 12. Next, we convert that number from percent to standard decimal by dividing by 100. We can now plug the result of that computation into the next equation:

monthly payment = (principle*MIR)/(1-(1+MIR)^(-number of payments))

Having performed both calculations, we can now report back to the user the following information:

Monthly payment

Total amount paid over the lifetime of the loan

Total interest paid over the lifetime of the loan

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!