Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ExamTasks;
- import java.util.Scanner;
- public class Birthday {
- public static void main(String[] agrs) {
- Scanner scanner = new Scanner(System.in);
- int lengthCm = Integer.parseInt(scanner.nextLine());
- int widthCm = Integer.parseInt(scanner.nextLine());
- int heigthCm = Integer.parseInt(scanner.nextLine());
- double percent = Double.parseDouble(scanner.nextLine());
- int volume = lengthCm * widthCm * heigthCm;
- double l = volume * 0.001;
- double newPercent = percent * 0.01;
- double needLiters = l * (1 - newPercent);
- System.out.printf("%.3f",needLiters);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment