Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class TailorWorkshop {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int num = Integer.parseInt(scanner.nextLine());
- double length = Double.parseDouble(scanner.nextLine());
- double width = Double.parseDouble(scanner.nextLine());
- double mats, cloths, result, total, total2;
- mats = num*(length/2 * length/2);
- cloths = num*(length + 0.6)*(width + 0.6);
- total = mats*9 + cloths*7;
- total2 = total*1.85;
- System.out.printf("%.2f USD%n%.2f BGN", total, total2);
- //System.out.printf("%.2f BGN", total2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement