desislava_topuzakova

Untitled

Aug 26th, 2021
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. package com.denishristov;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class roomPaiting {
  6. public static void main(String[] args) {
  7. Scanner scanner = new Scanner(System.in);
  8. int paintingBoxes = Integer.parseInt(scanner.nextLine());
  9. int Rolkitupeti = Integer.parseInt(scanner.nextLine());
  10. double gloves = Double.parseDouble(scanner.nextLine());
  11. double Chetka = Double.parseDouble(scanner.nextLine());
  12.  
  13. double needGloves = Math.ceil(Rolkitupeti * 0.35);
  14. double needChetka = Math.floor(paintingBoxes * 0.48);
  15.  
  16. double delivery = ((paintingBoxes * 21.5) + (Rolkitupeti * 5.20) + (gloves * needGloves) + (Chetka * needChetka)) / 15;
  17.  
  18. System.out.printf("This delivery will cost %.2f lv.", delivery);
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment