자바·JSP
원리금 균등 분할 상환 계산
미랭군
2017. 12. 20. 01:29
public class TestMain {
public static void main(String[] args) {
// TODO Auto-generated method stub
double profit = 3.5; //연이율
double month = 240;
double amount = 240000000;
double rate = profit / 100 / 12;
double denaminator = Math.pow((1 + rate), month) - 1;
double result = (rate + (rate / denaminator)) * amount;
System.out.println(result);
}
}