Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package JavaSyntax;
- import java.math.BigDecimal;
- import java.util.Scanner;
- public class P01_RectangleArea2 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double sideA = scanner.nextDouble();
- double sideB = scanner.nextDouble();
- BigDecimal A = new BigDecimal(sideA);
- BigDecimal B = new BigDecimal(sideB);
- BigDecimal area = A.multiply(B);
- System.out.printf("%.2f", area);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement