Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class ex09FishTank {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double length = Integer.parseInt(scanner.nextLine()) * 0.1;
- double width = Integer.parseInt(scanner.nextLine()) * 0.1;
- double height = Integer.parseInt(scanner.nextLine()) * 0.1;
- double percentOfFill = Double.parseDouble(scanner.nextLine());
- double volume = length * width * height;
- volume = volume - volume * percentOfFill / 100;
- System.out.println(volume);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement