Advertisement
paykova

Birhday

Oct 6th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  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.  
  7. double length = Double.parseDouble(scanner.nextLine());
  8. double width = Double.parseDouble(scanner.nextLine());
  9. double height = Double.parseDouble(scanner.nextLine());
  10. double percent = Double.parseDouble(scanner.nextLine());
  11.  
  12. double volume, result, total;
  13.  
  14. volume = length * width * height;
  15. volume = volume * 0.001;
  16. total = volume - (percent/100 * volume);
  17.  
  18. System.out.printf("%.3f", total);
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement