ok so... im making a program that calculates loans and shit
basically i dont need help w/ the coding. but in order for my program to ever work, i need to find out the TOTAL INTEREST.
Now the totalInterest is the monthlyInterest from every month summed up.
totalInterest = ???
(It never actually tells me how they got the Total Amount of Interest in the example.)
so knowing this....
The way they got the monthly interest is taking the ammount still owing on the loan and multiply it by the interest rate and then dividing it by the number of months. So the interest is different for every month.
monthlyInterest = (amountRemaing * interestRate) / 12;
but the principal for that months is done by taking the monthlyPayment and subtracting the interest.
monthlyPrincipal = monthlyPayment - monthlyInterest;
NOW HERE'S THE KICKER:
THE WAY THEY FIGURE OUT THE MONTHLY PAYMENT.
monthlyPayment = (loanAmount + totalInterest) / 12;
so as u can see im fucked w/o knowing the totalInterest.
does anyone know a fucking formula for the totalInterest???
i've tried using nested loops, but for some reason i can't get it to add up all the months, something is going wrong.
basically i dont need help w/ the coding. but in order for my program to ever work, i need to find out the TOTAL INTEREST.
Now the totalInterest is the monthlyInterest from every month summed up.
totalInterest = ???
(It never actually tells me how they got the Total Amount of Interest in the example.)
so knowing this....
The way they got the monthly interest is taking the ammount still owing on the loan and multiply it by the interest rate and then dividing it by the number of months. So the interest is different for every month.
monthlyInterest = (amountRemaing * interestRate) / 12;
but the principal for that months is done by taking the monthlyPayment and subtracting the interest.
monthlyPrincipal = monthlyPayment - monthlyInterest;
NOW HERE'S THE KICKER:
THE WAY THEY FIGURE OUT THE MONTHLY PAYMENT.
monthlyPayment = (loanAmount + totalInterest) / 12;
so as u can see im fucked w/o knowing the totalInterest.
does anyone know a fucking formula for the totalInterest???
i've tried using nested loops, but for some reason i can't get it to add up all the months, something is going wrong.