Advertisement
Guest User

05. Multiply Big Number

a guest
Mar 24th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import java.math.BigDecimal;
  2. import java.util.*;
  3.  
  4. public class Main {
  5.  
  6. public static void main(String[] args) {
  7. Scanner scanner = new Scanner(System.in);
  8.  
  9. BigDecimal x = new BigDecimal(scanner.nextLine());
  10. int y = Integer.parseInt(scanner.nextLine());
  11. BigDecimal result = x.multiply(new BigDecimal(y));
  12. System.out.println(result);
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement