Advertisement
desislava_topuzakova

05.DanceHall

Feb 9th, 2020
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class DanceHall_05 {
  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 sideWardrobe = Double.parseDouble(scanner.nextLine());
  10.  
  11.         double hallArea = (length * 100) * (width * 100);
  12.         double benchArea = hallArea / 10;
  13.         double wardrobeArea = (sideWardrobe * 100) * (sideWardrobe * 100);
  14.         double freeSpace = hallArea - benchArea - wardrobeArea;
  15.         double dancers = freeSpace / 7040;
  16.  
  17.         System.out.printf("%.0f",Math.floor(dancers));
  18.  
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement