Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.denishristov;
- import java.util.Scanner;
- public class roomPaiting {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int paintingBoxes = Integer.parseInt(scanner.nextLine());
- int Rolkitupeti = Integer.parseInt(scanner.nextLine());
- double gloves = Double.parseDouble(scanner.nextLine());
- double Chetka = Double.parseDouble(scanner.nextLine());
- double needGloves = Math.ceil(Rolkitupeti * 0.35);
- double needChetka = Math.floor(paintingBoxes * 0.48);
- double delivery = ((paintingBoxes * 21.5) + (Rolkitupeti * 5.20) + (gloves * needGloves) + (Chetka * needChetka)) / 15;
- System.out.printf("This delivery will cost %.2f lv.", delivery);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment