trand

Repainting_06

Jul 5th, 2022
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. package Example;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Repainting_06 {
  6. public static void main(String[] args) {
  7. Scanner scanner = new Scanner(System.in);
  8.  
  9. double naylon = Double.parseDouble(scanner.nextLine()) + 2;
  10. double paint = Double.parseDouble(scanner.nextLine()) * 1.1;
  11. double razreditel = Double.parseDouble(scanner.nextLine());
  12. int hourMaster = Integer.parseInt(scanner.nextLine());
  13.  
  14. double sumMaterials = (naylon * 1.50) + (paint * 14.50) + (razreditel * 5) + 0.40;
  15. double sumMasters = (sumMaterials * 0.3) * hourMaster;
  16.  
  17. double sumAll = sumMaterials + sumMasters;
  18.  
  19. System.out.println(sumAll);
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment