Advertisement
Kur23

ft

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