Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class TrainingLab {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double height = Double.parseDouble(scanner.nextLine());
- double width = Double.parseDouble(scanner.nextLine());
- double desksHeight = Math.floor((height - 1) / 1.2);
- double desksWidth = Math.floor (width / 0.7);
- double numberSeats = Math.floor(desksHeight * desksWidth) - 3;
- System.out.printf("%.0f", numberSeats);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement