Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class WeddingHall {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- double length = Double.parseDouble(sc.nextLine());
- double width = Double.parseDouble(sc.nextLine());
- double barSide = Double.parseDouble(sc.nextLine());
- double hallSize = length*width;
- double barSize = barSide*barSide;
- double dancingSize = hallSize*0.19;
- double freeSpace = hallSize - (barSize + dancingSize);
- double guests = Math.ceil(freeSpace/3.2);
- System.out.printf("%.0f", guests);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement