Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. package OldExams;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class TailoringWorkshop {
  6. public static void main(String[] args) {
  7. Scanner scanner = new Scanner(System.in);
  8. int a = Integer.parseInt(scanner.nextLine());
  9. double l = Double.parseDouble(scanner.nextLine());
  10. double w = Double.parseDouble(scanner.nextLine());
  11.  
  12. double area1 = a * (l + 2 * 0.30) * (w + 2 * 0.30);
  13. double area2 = a * (l / 2) * (l / 2);
  14.  
  15. double USD = area1 * 7 + area2 * 9;
  16. double BGN = USD * 1.85;
  17.  
  18. System.out.printf("%.2f USD%n", area1);
  19. System.out.printf("%.2f BGN", area2);
  20.  
  21.  
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement