Advertisement
Lyubohd

Untitled

Jun 20th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class TrainingLab {
  4.     public static void main(String[] args) {
  5.         Scanner scan = new Scanner(System.in);
  6.  
  7.         Double height = Double.parseDouble(scan.nextLine());
  8.         Double weight = Double.parseDouble(scan.nextLine());
  9.  
  10.         Double heightincm = height * 100;
  11.         Double weightincm = weight * 100;
  12.  
  13.         Double rows = Math.floor(heightincm / 120.0);
  14.         Double clearweight = weightincm - 100;
  15.         Double desks = Math.floor(clearweight / 70.0);
  16.  
  17.         Double places = (rows * desks) - 3;
  18.         System.out.println(places);
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement