Advertisement
kalin729

fishtank

Mar 7th, 2021
591
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main2 {
  6.  
  7.     public static void main(String[] args) {
  8.         Scanner s = new Scanner(System.in);
  9.  
  10.         int l = Integer.parseInt(s.nextLine());
  11.         int w = Integer.parseInt(s.nextLine());
  12.         int h = Integer.parseInt(s.nextLine());
  13.         double per = Double.parseDouble(s.nextLine());
  14.  
  15.         int volCM = l * w * h;
  16.         double volL = volCM * 0.001;
  17.         double nedL = volL - volL * per / 100;
  18.  
  19.         System.out.printf("%.5f", nedL);
  20.  
  21.     }
  22.  
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement