Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Project: Exam_06_March_2016 - created by borkins on 2017-05-14.
- */
- import java.util.Scanner;
- public class _01_TrainingLab
- {
- public static void main(String[] args)
- {
- Scanner console = new Scanner(System.in);
- double h = Double.parseDouble(console.nextLine());
- double w = Double.parseDouble(console.nextLine());
- // Values in centimeters
- int corridorWidth = 100;
- int workplaceWidth = 70;
- int workplaceLength = 120;
- h *= 100; // width (cm)
- w *= 100; // length (cm)
- int workplacesPerRow = (int) Math.floor((w - corridorWidth) / workplaceWidth);
- int rows = (int) Math.floor(h / workplaceLength);
- int workplaces = (workplacesPerRow * rows) - 3;
- System.out.println(workplaces);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment