Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Source code
- 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 w = Double.parseDouble(scanner.nextLine());
- 7
- double h = Double.parseDouble(scanner.nextLine());
- 8
- double wSm = w * 100;
- 9
- double wDesk = Math.floor(wSm / 120);
- 10
- double hSm = h * 100 - 100;
- 11
- double hDesk = hSm / 70;
- 12
- double workPl = wDesk * hDesk - 3;
- 13
- System.out.printf("%.0f", workPl);
- 14
- }
- 15
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement