摘要: 1.利用Math.round()的方法: 两个int型的数相除,结果保留小数点后两位: int a=1188; int b=93; double c; c=(double)(Math.round(a/b)/100.0);//这样为保持2位 打印结果:c=0.12 c=new Double(Math. 阅读全文
posted @ 2020-12-03 20:56 OolongTea 阅读(9279) 评论(0) 推荐(0)