SHARE
TWEET

Untitled

a guest Apr 20th, 2019 106 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class Birthday {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         int aquariumLength = Integer.parseInt(scanner.nextLine());
  7.         int aquariumWidth = Integer.parseInt(scanner.nextLine());
  8.         int aquariumHeight = Integer.parseInt(scanner.nextLine());
  9.         double sandPercent = Double.parseDouble(scanner.nextLine());
  10.  
  11.  
  12.         int aquariumVolume = aquariumLength * aquariumWidth * aquariumHeight;
  13.         double aquariumVolumeInDecimeters = aquariumVolume * 0.001;
  14.         double aquariumAttributesVolumeInDecimeters = sandPercent * 0.01;
  15.         double result = aquariumVolumeInDecimeters * (1 - aquariumAttributesVolume );
  16.  
  17.  
  18.         System.out.printf("% . 3f" , result);
  19.  
  20.  
  21.     }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top