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 length = Double.parseDouble(scan.nextLine());
- double width = Double.parseDouble(scan.nextLine());
- double wardrobeSide = Double.parseDouble(scan.nextLine());
- double hallArea = (length * 100) * (width * 100);
- double wardrobeArea = (wardrobeSide*100)*(wardrobeSide*100);
- double bench = hallArea/10;
- double freeArea = hallArea - (wardrobeArea + bench);
- double numOfDancers = freeArea/(40+7000);
- System.out.printf("%.0f", Math.floor(numOfDancers));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement