Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class P15_Tailoring {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double tables = Double.parseDouble(scanner.nextLine());
- Double tableslenght = Double.parseDouble(scanner.nextLine());
- Double tableswidth = Double.parseDouble(scanner.nextLine());
- Double area1 = tables * (tableslenght + 2 * 0.30) * (tableswidth + 2 * 0.30);
- Double area2 = tables * (tableslenght / 2) * (tableslenght / 2);
- double USD = (area1 * 7) + (area2 * 9);
- double BGN = USD * 1.85;
- System.out.printf("%.2f USD %n", USD);
- System.out.printf("%.2f BGN", BGN);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement