Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 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. double height = Double.parseDouble(scanner.nextLine());
  7. double width = Double.parseDouble(scanner.nextLine());
  8. double desksHeight = Math.floor((height - 1) / 1.2);
  9. double desksWidth = Math.floor (width / 0.7);
  10. double numberSeats = Math.floor(desksHeight * desksWidth) - 3;
  11.  
  12. System.out.printf("%.0f", numberSeats);
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement