Java: Loop isn't working, help?

Answers:0   |   LastUpdateAt:2012-09-12 19:18:03  

Question
Lourane
Asked at 2012-09-12 19:18:03
Short details of the mission : I need to create a loan calculator to calculate payment information during three separate loans . ( information includes payment , interest paid per month , the remaining balance ) . This must be done for each loan until they reach 0.00. MedlinePlus MedlinePlus For some reason my loop is not computing time and again . Only calculated the first loan payment of 2 and 3 , and that's it . So I do not know what I'm doing wrong . Instead of copying all the code here , I thought it was just bad coding loops ? So here it is : MedlinePlus MedlinePlus for ( int i = 1; i < = ( totalPayments [ i ] ) ; i + + ) MedlinePlus { MedlinePlus MedlinePlus interestPaid [i ] = ( Balance [ i] * yearlyInterest [i ]) / oneYear ; MedlinePlus principalPaid [i ] = paymentAmount [i] - interestPaid [i]; MedlinePlus paymentAmount [i ] = paymentAmount [i ] = Balance [i ] * ( monthlyInterest [i ] * Math.pow ((1 + monthlyInterest [ i]), totalPayments [ i]) ) / (( Math.pow ((1 + monthlyInterest [ i]), totalPayments [ i]) - 1)) ; MedlinePlus MedlinePlus LoanData (Balance [i], principalPaid [i], interestPaid [i], loanTerm [i ], i, yearlyInterest [i], paymentAmount [i ]); MedlinePlus MedlinePlus if ( i % 12 == 1) MedlinePlus { MedlinePlus MedlinePlus System.out.println ( " Term Loan = " + loanTerm [ i ] + "years " + " t " + " Interest Rate = " + String.Format ( " % .2 f " , yearlyInterest [ i ] * 100) + " % " ) ; MedlinePlus System.out.println ( " _____________
Answers

This Question:"Java: Loop isn't working, help?" No answers yet. Be the first!
Related Questions
1
  • Answer This Question:Java: Loop isn't working, help?