SHARE
TWEET

Untitled

a guest Sep 16th, 2019 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class SchoolHall {
  4.  
  5.     public static void main(String[] args) {
  6.  
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         double hallLengthMeters = Double.parseDouble(scanner.nextLine());
  10.         double hallWidthMeters = Double.parseDouble(scanner.nextLine());
  11.  
  12.         //int hlm = (int)hallLengthMeters;
  13.         //int hwm = (int)hallWidthMeters;
  14.  
  15.         double hallAreaCm = (hallLengthMeters * 100) * (hallWidthMeters * 100);
  16.         double corridorArea = 100 * (hallLengthMeters * 100);
  17.         double freeAreaCm = hallAreaCm - corridorArea;
  18.  
  19.         int freeSpace = (int)freeAreaCm;
  20.  
  21.         int seat = 70 * 120;
  22.  
  23.         int seats = freeSpace/seat - 3;
  24.  
  25.  
  26.         //int hallAreaCm = (hlm * 100) * (hwm * 100);
  27.         //int workingPlaceCm = 70 * 120;
  28.         //int corridorArea = 100 * (hlm * 100);
  29.  
  30.         //int columns = ((hlm * 100) - 100) / 70;
  31.         //int rows = (hwm * 100) / 120;
  32.  
  33.  
  34.         //int seats = columns * rows;
  35.  
  36.  
  37.         //double freeArea = hallAreaCm - corridorArea;
  38.         //double workingPlaces = freeArea/workingPlaceCm - 3;
  39.  
  40.         System.out.println(seats - 3);
  41.  
  42.  
  43.     }
  44. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top