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);


}

}

 

posted @ 2015-10-28 22:37  ft039x  阅读(131)  评论(0编辑  收藏  举报
TOP