Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Exam3_3_10_2018_WeddingHall {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double hallLengthCm = Double.parseDouble(scanner.nextLine());
- double hallWidthCm = Double.parseDouble(scanner.nextLine());
- double barSideCm = Double.parseDouble(scanner.nextLine());
- int hallArea = (int) (hallLengthCm * hallWidthCm);
- int barSideArea = (int) (barSideCm * barSideCm);
- double danceFloorArea = hallArea * 0.19;
- double freeSpace = hallArea - danceFloorArea - barSideArea;
- int numberGuests = (int) Math.ceil(freeSpace/ 3.2);
- System.out.println(numberGuests);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment