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