Advertisement
veronikaaa86

[Java] Training Lab

Sep 18th, 2017
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class TrainingLab {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         double h = Double.parseDouble(scanner.nextLine());
  8.         double w = Double.parseDouble(scanner.nextLine());
  9.  
  10.         int hDesk = 120;
  11.         int wDesk = 70;
  12.         int missDesk = 3;
  13.         int hall = 100;
  14.  
  15.         double rowsDesk = Math.floor((h*100)/hDesk);
  16.         double seatsDesk = Math.floor(((w*100)-hall)/wDesk);
  17.  
  18.         double allDesk = (int) ((rowsDesk*seatsDesk)-missDesk);
  19.  
  20.         System.out.println(allDesk);
  21.  
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement