Advertisement
Krassi_Daskalova

Multiply Big Number

Jul 19th, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import java.math.BigDecimal;
  2. import java.util.Scanner;
  3.  
  4. public class MultiplyBigInteger {
  5. public static void main(String[] args){
  6. Scanner scanner = new Scanner(System.in);
  7. BigDecimal firstNum = new BigDecimal(scanner.next());
  8. BigDecimal secondNum = new BigDecimal(scanner.next());
  9. BigDecimal result = firstNum.multiply(secondNum);
  10. System.out.println(result);
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement