Advertisement
Kathy2905

DanceHall

Sep 16th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 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.  
  7. double lengthL = Double.parseDouble(scanner.nextLine());
  8. double wigthW = Double.parseDouble(scanner.nextLine());
  9. double gardA = Double.parseDouble(scanner.nextLine());
  10.  
  11. double areaHall = (lengthL * 100) * (wigthW * 100);
  12. double areaGar = (Math.pow(gardA, 2)) * 100;
  13. double peika = areaHall / 10;
  14. double freeSpace = areaHall - areaGar - peika;
  15. double dancers = freeSpace / (40 + 7000);
  16.  
  17. System.out.println( Math.floor(dancers));
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement