check this link first: loan calculator I need help with how to code the loan calculator if I for eksempel loan 20 000 pound with 4% rate in 240 months. How to code that the balance is going down while principle goes up and interest goes down? I have created variables and with the user input it goes out with this method:
double l;
double t;
double r;
double LB;
double AB;
double TB;
double p;
double o;
double g;
double h;
double AB2;
double RB2;
private String[] getListe(){
String[] listeTabell = new String[antTerminer];
for(int rad=0;rad<listeTabell.length;rad++) {
double RB = Math.round(LB * (r / t) / 100);
LB -= (int) AB;
listeTabell[rad] = "Dette er termin nr : " + (rad + 1) +
" Terminbeløp: " + ((int)(AB+RB)) +
" Avdrag: " + (int)AB +
" Rente: " + RB +
" Restgjeld: " + LB;
}
return listeTabell;
}
So I just need how to code balance, principal and interest. Thanks.
Aucun commentaire:
Enregistrer un commentaire