Guest User

Untitled

a guest
Nov 15th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. package Exams.Nov_2018;
  2.  
  3.         import java.util.Scanner;
  4.  
  5. public class I_02WeddingHall {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.         double length=Integer.parseInt(scanner.nextLine());
  9.         double width=Integer.parseInt(scanner.nextLine());
  10.         double barSide=Integer.parseInt(scanner.nextLine());
  11.  
  12.         double hallArea=length*width;
  13.         double dancing=hallArea*0.19;
  14.  
  15.         double freeSpace=hallArea-barSide*barSide-dancing;
  16.         double dancerCount=Math.ceil(freeSpace/3.2);
  17.  
  18.  
  19.         System.out.printf("%.0f",dancerCount);
  20.  
  21.     }
  22. }
Add Comment
Please, Sign In to add comment