-1
public void showLoanPayments(View clickedButton) {
double loanAmount = Integer.(mLoanAmount.getText().toString());
double interestRate = (Integer.parseInt(mInterestRate.getText().toString()));
double loanPeriod = Integer.parseInt(mLoanPeriod.getText().toString());
double r = interestRate/1200;
double r1 = Math.pow(r+1,loanPeriod);
double monthlyPayment = (double) ((r+(r/(r1-1))) * loanAmount);
double totalPayment = monthlyPayment * loanPeriod;
mMonthlyPaymentResult.setText(new DecimalFormat("##.##").format(monthlyPayment));
mTotalPaymentsResult.setText(new DecimalFormat("##.##").format(totalPayment));
}
}
あなたが問題を解決した場合は、残りの人々が恩恵を受けるように答えを記入してください。 –