public String getPercentResult(int a,int b) {
String result = "0.00%";
if (b==0) {
return result;
}
float c=(float)a/b;
NumberFormat percentInstance = NumberFormat.getPercentInstance();
percentInstance.setMinimumFractionDigits(2);
result = percentInstance.format(c);
System.out.println("a/b="+result);
return result;
}