Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int areaSide = Integer.parseInt(scanner.nextLine());
- double tileWidth = Double.parseDouble(scanner.nextLine()),
- tileLength = Double.parseDouble(scanner.nextLine());
- int benchWidth = Integer.parseInt(scanner.nextLine()),
- benchLength = Integer.parseInt(scanner.nextLine());
- int area = areaSide * areaSide - benchLength * benchWidth;
- double tileArea = tileWidth * tileLength;
- double tiles = area / tileArea;
- double time = tiles * 0.2;
- System.out.printf("%f\n%f\n", tiles, time);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement