Skip to content

Commit 402f7cc

Browse files
authored
Update README.md
1 parent 7a94515 commit 402f7cc

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

README.md

+12-6
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@
311311
int numberOfPayments = years * MONTHS_IN_YEAR;
312312

313313
/*calculating mortgage*/
314-
double mortgage = principal * (monthlyInterest * Math.pow(1 + monthlyInterest, numberOfPayments) / (Math.pow(1 + monthlyInterest, numberOfPayments) - 1));
314+
double mortgage = principal * (monthlyInterest * Math.pow(1 + monthlyInterest, numberOfPayments)
315+
/ (Math.pow(1 + monthlyInterest, numberOfPayments) - 1));
315316

316317
System.out.println("Mortgage: " + NumberFormat.getCurrencyInstance().format(mortgage));
317318
}
@@ -562,7 +563,8 @@
562563
563564
}
564565
/*calculating mortgage*/
565-
double mortgage = principal * (monthlyInterest * Math.pow(1 + monthlyInterest, numberOfPayments) / (Math.pow(1 + monthlyInterest, numberOfPayments) - 1));
566+
double mortgage = principal * (monthlyInterest * Math.pow(1 + monthlyInterest, numberOfPayments)
567+
/ (Math.pow(1 + monthlyInterest, numberOfPayments) - 1));
566568
567569
System.out.println("Mortgage: " + NumberFormat.getCurrencyInstance().format(mortgage));
568570
}
@@ -618,7 +620,8 @@
618620
float monthlyInterest = annualInterest / PERCENT / MONTHS_IN_YEAR;
619621
short numberOfPayments = (short) (years * MONTHS_IN_YEAR);
620622
621-
return principal * (monthlyInterest * Math.pow(1 + monthlyInterest, numberOfPayments) / (Math.pow(1 + monthlyInterest, numberOfPayments) - 1));
623+
return principal * (monthlyInterest * Math.pow(1 + monthlyInterest, numberOfPayments)
624+
/ (Math.pow(1 + monthlyInterest, numberOfPayments) - 1));
622625
}
623626
}
624627
```
@@ -676,7 +679,9 @@
676679
float monthlyInterest = annualInterest / PERCENT / MONTHS_IN_YEAR;
677680
short numberOfPayments = (short) (years * MONTHS_IN_YEAR);
678681
679-
double balance = principal * (Math.pow(1 + monthlyInterest, numberOfPayments) - Math.pow(1 + monthlyInterest, numberOfPaymentsMade)) / (Math.pow(1 + monthlyInterest, numberOfPayments) - 1);
682+
double balance = principal * (Math.pow(1 + monthlyInterest, numberOfPayments)
683+
- Math.pow(1 + monthlyInterest, numberOfPaymentsMade))
684+
/ (Math.pow(1 + monthlyInterest, numberOfPayments) - 1);
680685
681686
return balance;
682687
}
@@ -685,7 +690,8 @@
685690
float monthlyInterest = annualInterest / PERCENT / MONTHS_IN_YEAR;
686691
short numberOfPayments = (short) (years * MONTHS_IN_YEAR);
687692
688-
return principal * (monthlyInterest * Math.pow(1 + monthlyInterest, numberOfPayments) / (Math.pow(1 + monthlyInterest, numberOfPayments) - 1));
693+
return principal * (monthlyInterest * Math.pow(1 + monthlyInterest, numberOfPayments)
694+
/ (Math.pow(1 + monthlyInterest, numberOfPayments) - 1));
689695
}
690696
}
691697
```
@@ -710,4 +716,4 @@
710716
711717
## Thank You!
712718
713-
![preview](preview/preview-8.png)
719+
![preview](preview/preview-8.png)

0 commit comments

Comments
 (0)