Question
Create a C program that will calculate the interest paid on a loan. The equations we will use are: I[o] = (r/12)*B I[n] = (r/12)*(B-P+I[n-1])
Create a C program that will calculate the interest paid on a loan. The equations we will use are:
I[o] = (r/12)*B I[n] = (r/12)*(B-P+I[n-1])
Where: r is the annual interest rate (assume 25% or 0.25). B is the amount borrowed (assume $2000). P is the payment amount (pick some value). I[o] is the interest due after the first month. I[n] is the interest due after the nth month.
Your program must prompt the user for the monthly payment that they wish to make. Your program must then display the interest rate (r), the initial balance (B), the monthly payment (P). Your program must then produce a month-by-month table showing the month, the interest due/paid each month and the remaining balance.
The table must take the user to the payoff-point (where balance becomes zero or negative). Finally the program must display the total interest paid over the life of the loan.
Example: -------- Enter your monthly payment: 200
r = 0.25 B = 2000.0 P = 200.0
1 41.67 2000.00 2 38.37 1841.67 3 35.00 1680.03 4 31.56 1515.04 5 28.05 1346.60 6 24.47 1174.65 7 20.82 999.12 8 17.08 819.94 9 13.27 637.02 10 9.38 450.29 11 5.41 259.67 12 1.36 65.08 13 -2.78 -133.56
total interest paid: 266.44
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started