Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class DanceHall {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- double lenght = Double.parseDouble(scan.nextLine());
- double weight = Double.parseDouble(scan.nextLine());
- double sideA = Double.parseDouble(scan.nextLine()); //wardrobe
- double areaHall = (lenght * 100) * (weight * 100); // m3 to sm3
- double bench = areaHall / 10;
- double areaA = (sideA * 100) * (sideA * 100); //wardrobe
- double freeSpace = areaHall - bench - areaA;
- double dancers = freeSpace / (40 + 7000);
- int result = (int)Math.round(dancers); //from double to int
- System.out.println(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement