Concept
What is ", i, monthlyInterest, 39 monthlyPrinciplePayment, balance); 40 } 41 42 //handle the last month and last payment separately 43 double lastInterest = Math?
ComputerScienceOne / Paying the Piper
"\", i, monthlyInterest, 39 monthlyPrinciplePayment, balance); 40 } 41 42 //handle the last month and last payment separately 43 double lastInterest = Math.round( 44 (balance * monthlyInterestRate) * 100.0) / 100.0; 45 double lastPayment = balance + lastInterest; 46 47 System.out.printf(\"Last payment = $%.2f\n\n\", lastPayment); 48 49 } 50 51 } Code Sample 28.10.: Loan Amortization Program in Java 422"
Related Ideas
- How can a PHP program calculate and round a monthly loan payment?ComputerScienceOne · Paying the Piper
- How can a loan amortization schedule handle rounded payments in C?ComputerScienceOne · Paying the Piper
- What other functions topic is included in the chapter?ComputerScienceOne · Paying the Piper
- How does the Functions chapter explain how functions work?ComputerScienceOne · Paying the Piper
- What topics are included in defining and using functions?ComputerScienceOne · Paying the Piper