Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.text.DecimalFormat;
- import java.util.Scanner;
- import java.lang.Math;
- public class Birthday {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int L = Integer.parseInt(scanner.nextLine());
- int W = Integer.parseInt(scanner.nextLine());
- int H = Integer.parseInt(scanner.nextLine());
- double Percentage = Double.parseDouble(scanner.nextLine());
- double Volume = L * W * H;
- double Litre = Volume * 0.001;
- double UsableVolume = Litre * (1 - (Percentage * 0.01));
- DecimalFormat f = new DecimalFormat("##.000");
- System.out.println(f.format(UsableVolume));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment