Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Repainting {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int plasticMeters = Integer.parseInt(scanner.nextLine());
- int paintLiters = Integer.parseInt(scanner.nextLine());
- int thinnerLiters = Integer.parseInt(scanner.nextLine());
- int workersHours = Integer.parseInt(scanner.nextLine());
- double plasticSum = (plasticMeters + 2) * 1.50;
- double paintSum = (paintLiters + (paintLiters * 0.10)) * 14.50;
- double thinnerSum = thinnerLiters * 5.00;
- double totalSum = plasticSum + paintSum + thinnerSum + 0.40;
- double priceForWorkersPerHour = totalSum * 0.30;
- double workersTotalPrice = priceForWorkersPerHour * workersHours;
- System.out.println(totalSum + workersTotalPrice);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement