Advertisement
IrinaIgnatova

Sum Big Numbers

Jul 4th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. package com.company;
  2.  
  3.  
  4. import java.math.BigInteger;
  5. import java.util.*;
  6.  
  7. public class Main {
  8.  
  9.     public static void main(String[] args) {
  10.         Scanner scanner = new Scanner(System.in);
  11.  
  12.         BigInteger firstNumber = new BigInteger(scanner.nextLine());
  13.         BigInteger secondNumber = new BigInteger(scanner.nextLine());
  14.         BigInteger sum = firstNumber.add(secondNumber);
  15.  
  16.         System.out.println(sum);
  17.  
  18.  
  19.     }
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement