题目描述 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
转载自 http://blog.csdn.net/com_stu_zhang/article/details/7214565 方法1: float f = 34.232323; BigDecimal b = new BigDecimal(f); float f1 = b.setScale(2, BigDecimal.ROUND_HALF_UP).floatValue(); // b.setScale(2, BigDecimal.ROUND
If IsNull({DECL_INV_ITEM_I.DECLEAR_NO}) Or Trim({DECL_INV_ITEM_I.DECLEAR_NO}) = "" Then "0" Else CStr({DECL_INV_ITEM_I.EX_RATE},5,',') CSTR({number_field}, 0, ''),第一个是数字字段:第二个是保留的小数位,0是整数:第三个是千分位分隔字符.
方法1: float f = 34.232323; BigDecimal b = new BigDecimal(f); float f1 = b.setScale(2, BigDecimal.ROUND_HALF_UP).floatValue(); // b.setScale(2, BigDecimal.ROUND_HALF_UP) 表明四舍五入,保留两位小数 float ft = 134.3435f; int scale = 2
public class $66 { public static void main(String agrs[]) { float a=(float) 1.123456789;//8位 System.out.println(a);//1.1234568 double aa=10.123456789123456789;//17位 System.out.println(aa);// 10.123456789123457 } } public class $66 { public static voi