Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class TaylorShop {
- public static void main(String[] agrs) {
- Scanner scan = new Scanner(System.in);
- int tables = Integer.parseInt(scan.nextLine());
- double lenghtM = Double.parseDouble(scan.nextLine());
- double widthM = Double.parseDouble(scan.nextLine());
- double areaCovers = tables * (lenghtM + 2 * 0.30) * (widthM + 2 * 0.30);
- double areaSquares = tables * (lenghtM / 2) * (lenghtM / 2);
- double priceDollars = areaCovers * 7 + areaSquares * 9;
- double priceBGN = priceDollars * 1.85;
- System.out.printf("%.2f USD %n", priceDollars);
- System.out.printf("%.2f BGN", priceBGN);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement