Advertisement
uktcar

01.2.09FishTank

Mar 6th, 2023 (edited)
685
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class ex09FishTank {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         double length = Integer.parseInt(scanner.nextLine()) * 0.1;
  8.         double width = Integer.parseInt(scanner.nextLine()) * 0.1;
  9.         double height = Integer.parseInt(scanner.nextLine()) * 0.1;
  10.         double percentOfFill = Double.parseDouble(scanner.nextLine());
  11.  
  12.         double volume = length * width * height;
  13.         volume = volume - volume * percentOfFill / 100;
  14.  
  15.         System.out.println(volume);
  16.  
  17.     }
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement