Please post your code in code or highlight tags.

Your error is in this line:
double monthlyLoanRepayments = (loanAmount*interestRate)/(1-(1/(Math.pow((1+interestRate),(lengthOfLoan*12)))));...