Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class demo {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n = Integer.parseInt(scanner.nextLine());
- double w = Double.parseDouble(scanner.nextLine());
- double l = Double.parseDouble(scanner.nextLine());
- int m = Integer.parseInt(scanner.nextLine());
- int o = Integer.parseInt(scanner.nextLine());
- int area = n * n;
- int benchArea = m * o;
- int totalArea = area - benchArea;
- double plateArea = w * l;
- double neededPlates = totalArea / plateArea;
- double time = neededPlates * 0.2;
- System.out.printf("%.2f%n%.2f", neededPlates, time);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement