Advertisement
desislava_topuzakova

Зала за танци

Jan 19th, 2018
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class DanceHall {
  4.     public static void main(String[] agrs) {
  5.         Scanner scan = new Scanner(System.in);
  6.  
  7.         double L = Double.parseDouble(scan.nextLine());
  8.         double W = Double.parseDouble(scan.nextLine());
  9.         double A = Double.parseDouble(scan.nextLine());
  10.  
  11.         double hall = (L * 100) * (W * 100);
  12.         double wardrobe = (A * 100) * (A * 100);
  13.         double bench = hall / 10;
  14.         double freeSpace = hall - wardrobe - bench;
  15.         double dancers=freeSpace/ (40 + 7000);
  16.  
  17.         System.out.println((int)Math.floor(dancers));
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement