A loan calculator program that computes both monthly and total payments for a given loan amount, annual interest rate, and loan period.
--for developing the solution we used Incermental development approch--
Let's put down the outline of program flow explicity. we can express the program flow as having three tasks:
- Get three input values: LoanAmount, interestRate, and loanPeriod.
- Compute the monthly and total payments.
- Output the resulte
The Formula for computing the monthly payment can be found in any mathematics book that covers geometric sequences.It is
Monthly payment = L * R/(1 - [1/(1 + R)]n-times