Skip to content

Instantly share code, notes, and snippets.

@Nikola-Andreev
Created May 6, 2017 06:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nikola-Andreev/219a4b5084fbede2f68730f55cc44710 to your computer and use it in GitHub Desktop.
Save Nikola-Andreev/219a4b5084fbede2f68730f55cc44710 to your computer and use it in GitHub Desktop.
01.Training lab
package ExamProblems;
import java.util.Scanner;
public class TrainingLab {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
double width = Double.parseDouble(scan.nextLine());
double height = Double.parseDouble(scan.nextLine());
int widthPlaces = (int)(height*100 - 100) / 70;
int heightPlaces = (int)(width*100) / 120;
System.out.println(widthPlaces*heightPlaces - 3);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment