Advertisement
Spocoman

06. Repainting

Aug 19th, 2024
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Repainting {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         int nylon = Integer.parseInt(scanner.nextLine());
  7.         int paint = Integer.parseInt(scanner.nextLine());
  8.         int thinner = Integer.parseInt(scanner.nextLine());
  9.         int hours = Integer.parseInt(scanner.nextLine());
  10.  
  11.         double materials = (nylon + 2) * 1.50 + paint * 14.50 * 1.10 + thinner * 5 + 0.40;
  12.         double workers = materials * hours * 0.30;
  13.  
  14.         System.out.println(materials + workers);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement