Advertisement
marking2112

Шиваики Цех

Jun 6th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class P15_Tailoring {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         double tables = Double.parseDouble(scanner.nextLine());
  8.         Double tableslenght = Double.parseDouble(scanner.nextLine());
  9.         Double tableswidth  = Double.parseDouble(scanner.nextLine());
  10.  
  11.         Double area1 = tables * (tableslenght + 2 * 0.30) * (tableswidth + 2 * 0.30);
  12.         Double area2 = tables * (tableslenght / 2) * (tableslenght / 2);
  13.  
  14.         double USD = (area1 * 7) + (area2 * 9);
  15.         double BGN = USD * 1.85;
  16.  
  17.         System.out.printf("%.2f USD %n", USD);
  18.         System.out.printf("%.2f BGN", BGN);
  19.  
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement