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 scan = new Scanner(System.in);
- Double height = Double.parseDouble(scan.nextLine());
- Double weight = Double.parseDouble(scan.nextLine());
- Double heightincm = height * 100;
- Double weightincm = weight * 100;
- Double rows = Math.floor(heightincm / 120.0);
- Double clearweight = weightincm - 100;
- Double desks = Math.floor(clearweight / 70.0);
- Double places = (rows * desks) - 3;
- System.out.println(places);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement