Mega Code Archive
Use math functions
public class MainClass {
public static void main(String args[]) {
double loanAmount = 0;
double top = 2 * 5 / 1200;
double bot = 1 - Math.exp(5 * (-12) * Math.log(1 + 7 / 1200));
System.out.println(loanAmount);
System.out.println(top);
System.out.println(bot);
}
}