java大数加法
package com.math; import java.math.BigInteger; import java.util.Scanner; public class TestBigInteger { public static void main(String[] args) { BigInteger bi1,bi2; Scanner sc = new Scanner(System.in);//标准输入流(从键盘输入) bi1 = sc.nextBigInteger(); bi2 = sc.nextBigInteger(); bi1 = bi1.add(bi2); System.out.println(bi1); } }
读好书,如同与先哲们交谈。