Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.82 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class TailoringWorkshop {
  4.     public static void main (String[] args){
  5.  
  6.         Scanner scan = new Scanner(System.in);
  7.  
  8.         int one = Integer.parseInt(scan.nextLine());
  9.         double two = Double.parseDouble(scan.nextLine());
  10.         double three = Double.parseDouble(scan.nextLine());
  11.         double priceSQ = 7;
  12.         double priceRA = 9;
  13.         double usd = 1.85;
  14.        
  15.         double pokrivka = one * (two + 2 * 0.30) * (three + 2 * 0.30);
  16.         double kar = one * (two/2 ) * (two / 2);
  17.  
  18.         double pokrivkaDOLAR = pokrivka * priceSQ + kar * priceRA;
  19.         double pokrivkaLV = pokrivkaDOLAR * usd ;
  20.         String USD = "USD";
  21.         String BGN = "BGN";
  22.        
  23.         System.out.printf("%.2f %s %n%.2f %s",pokrivkaDOLAR,USD,pokrivkaLV,BGN);
  24.  
  25.  
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement