Advertisement
veronikaaa86

06. Repainting

Jan 9th, 2022
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class P06Repainting {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int nylonQuantity = Integer.parseInt(scanner.nextLine());
  8. int paintQuantity = Integer.parseInt(scanner.nextLine());
  9. int razrQuantity = Integer.parseInt(scanner.nextLine());
  10. int hours = Integer.parseInt(scanner.nextLine());
  11.  
  12. double priceAllNylon = (nylonQuantity + 2) * 1.50;
  13. double priceAllPaint = (paintQuantity * 1.10) * 14.50;
  14. double priceAllRazr = razrQuantity * 5.0;
  15.  
  16. double allSupplies = priceAllNylon + priceAllPaint + priceAllRazr + 0.40;
  17.  
  18. double workerSum = (allSupplies * 0.30) * hours;
  19.  
  20. double result = allSupplies + workerSum;
  21.  
  22. System.out.println(result);
  23. }
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement