EliPerfanova

Dance Hall

Sep 12th, 2019
170
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 DanceHall {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6. double L = Double.parseDouble(scanner.nextLine());
  7. double W = Double.parseDouble(scanner.nextLine());
  8. double A = Double.parseDouble(scanner.nextLine());
  9.  
  10.  
  11. double room = (L * 100) * (W * 100);
  12. double wardrobe = (A * 100) * (A * 100);
  13. double bench = room/10;
  14. double freeSpace = room-wardrobe-bench;
  15. double people = freeSpace / (40 + 7000);
  16.  
  17. System.out.printf("%.0f",Math.floor(people));
  18.  
  19.  
  20.  
  21.  
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment