Advertisement
paykova

TailorWorkoshop

Oct 6th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class TailorWorkshop {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int num = Integer.parseInt(scanner.nextLine());
  8. double length = Double.parseDouble(scanner.nextLine());
  9. double width = Double.parseDouble(scanner.nextLine());
  10.  
  11. double mats, cloths, result, total, total2;
  12.  
  13. mats = num*(length/2 * length/2);
  14. cloths = num*(length + 0.6)*(width + 0.6);
  15.  
  16. total = mats*9 + cloths*7;
  17. total2 = total*1.85;
  18.  
  19. System.out.printf("%.2f USD%n%.2f BGN", total, total2);
  20. //System.out.printf("%.2f BGN", total2);
  21.  
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement