Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Y05DanceHall {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double length = Double.parseDouble(scanner.nextLine());
- double width = Double.parseDouble(scanner.nextLine());
- double Garderob = Double.parseDouble(scanner.nextLine());
- double lengthInCm = length * 100;
- double widthInCm = width * 100;
- double GarderobInCm = Garderob * 100;
- double SpacePerDancer = 40+7000;
- double DanceRoomSize = lengthInCm * widthInCm; //goleminata na zalata v m2
- double WardrobeSize = GarderobInCm * GarderobInCm; // goleminata na garderoba
- double BenchSize = DanceRoomSize / 10; //golemina na peikata
- double Dancing = DanceRoomSize - WardrobeSize - BenchSize;
- double QuantityDancers = Math.floor (Dancing / SpacePerDancer);
- System.out.printf("%.0f", QuantityDancers);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment