A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 阳光多灿烂 中级黑马   /  2016-3-20 00:08  /  447 人查看  /  0 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

BigInteger bi1 = new BigInteger("100");
                BigInteger bi2 = new BigInteger("2");
               
                System.out.println(bi1.add(bi2));                                 //+
                System.out.println(bi1.subtract(bi2));                        //-
                System.out.println(bi1.multiply(bi2));                         //*
                System.out.println(bi1.divide(bi2));                    ///(除)
               
                BigInteger[] arr = bi1.divideAndRemainder(bi2);        //取除数和余数
               
                for (int i = 0; i < arr.length; i++) {
                        System.out.println(arr[i]);
       

评分

参与人数 1黑马币 +20 收起 理由
不觉得寡 + 20 很给力!

查看全部评分

0 个回复

您需要登录后才可以回帖 登录 | 加入黑马