SHARE
TWEET

Untitled

a guest Jan 15th, 2020 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class DanceHall {
  4.     public static void main(String[] args) {
  5.         Scanner scan = new Scanner(System.in);
  6.         double lenght = Double.parseDouble(scan.nextLine());
  7.         double weight = Double.parseDouble(scan.nextLine());
  8.         double sideA = Double.parseDouble(scan.nextLine()); //wardrobe
  9.  
  10.         double areaHall = (lenght * 100) * (weight * 100); // m3 to sm3
  11.         double bench = areaHall / 10;
  12.         double areaA = (sideA * 100) * (sideA * 100); //wardrobe
  13.         double freeSpace = areaHall - bench - areaA;
  14.  
  15.         double dancers = freeSpace / (40 + 7000);
  16.         int result = (int)Math.round(dancers); //from double to int
  17.         System.out.println(result);
  18.     }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top