Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Birthday {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int length = Integer.parseInt(scanner.nextLine());
- int width = Integer.parseInt(scanner.nextLine());
- int height = Integer.parseInt(scanner.nextLine());
- double sandPercent = Double.parseDouble(scanner.nextLine());
- sandPercent = sandPercent * 0.01;
- double volume = length*width*height;
- volume = volume * 0.001;
- double liters = volume * (1-sandPercent);
- System.out.printf("%.3f", liters);
- }
- }
Add Comment
Please, Sign In to add comment