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