Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package USD_BG;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double legit = Double.parseDouble(scanner.nextLine());
- double wide = Double.parseDouble(scanner.nextLine());
- double tall = Double.parseDouble(scanner.nextLine());
- double percentage = Double.parseDouble(scanner.nextLine());
- double capacity = legit * wide * tall;
- double capacityInMeters = capacity * 0.001;
- double stuffSize = capacityInMeters * (percentage/100.0);
- double freeSpace = capacityInMeters - stuffSize;
- System.out.printf("%.2f", freeSpace);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment