题目描述 Given two postive integers A and B, please calculate the maximum integer C that C*B≤A, and the real number D equal to A/B. 输入格式 Two integers A and B in one line separated by a space.(A,B>0) 输出格式 Output C in one line,followed by D in one line. D…
java保留两位小数问题: 方式一: 四舍五入 double f = 111231.5585; BigDecimal b = new BigDecimal(f); double f1 = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); 保留两位小数 --------------------------------------------------------------- 方式二…