Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Y04TailoringWorkshop{
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double Tables = Integer.parseInt(scanner.nextLine());
- double lenght = Double.parseDouble(scanner.nextLine());
- double wide = Double.parseDouble(scanner.nextLine());
- double areaPokrivka = Tables * (lenght+2*0.3)*(wide+2*0.3);
- double areaKareta = Tables * (lenght/2)*(lenght/2);
- double PriceUSD = (areaPokrivka*7)+(areaKareta*9);
- double PriceUSDtoBGN = PriceUSD*1.85;
- System.out.printf("%.2f USD", PriceUSD );
- System.out.println();
- System.out.printf("%.2f BGN", PriceUSDtoBGN);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment