String loanamount = edtamount.getText().toString();
double doubleloanamount = Double.parseDouble(loanamount);
String strloanamount = Double.toString(doubleloanamount);
Log.v("doubleloanamout", strloanamount);
String years = edtyears.getText().toString();
double doubleyears = Double.parseDouble(years) * 12;
String strpaymentdoubleyears = Double.toString(doubleyears);
Log.v("doubleyears", strpaymentdoubleyears);
double inrate = doubleloanamount * 11 / 100;
double monthlyrate = inrate / 12;
double roundmonthlyrate = Math.round(monthlyrate);
String inratefordemo = Double.toString(roundmonthlyrate);
double Payment = (doubleloanamount
* Math.pow(( roundmonthlyrate) + 1, (doubleyears)) * roundmonthlyrate)
/ (Math.pow( roundmonthlyrate + 1, (doubleyears)) - 1);
double roundpayment = Math.round(Payment);
String strpayment = Double.toString(roundpayment);
Log.v("payment", strpayment);
edtemimonth.setText(strpayment);
我使用上面的代码来计算 EMI,但它显示 0 value.hay 我同时使用了 int 和 double 仍然它给我 0 for int 0.0 for double