double num1 =11;
double num1 =21;
String num1 ="";
DecimalFormat df = new DecimalFormat(".00");num3 = df.format((num1 - num2)/num2*100);
Sytem.out.println(num3);
运行结果:
num3=52.38
posted on 2012-08-10 12:32 专注2018 阅读(483) 评论(1) 编辑 收藏 举报