Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Workshoptr {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int tables = Integer.parseInt(scanner.nextLine());
- Double tablesLenght = Double.parseDouble(scanner.nextLine());
- Double tablesWidth = Double.parseDouble(scanner.nextLine());
- Double area1 = tables * (tablesLenght + 2 * 0.3) * (tablesWidth + 2 * 0.3);
- 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