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);
- double budget = Double.parseDouble(scanner.nextLine()),
- decors = budget / 10;
- int statists = Integer.parseInt(scanner.nextLine());
- double dresses = Double.parseDouble(scanner.nextLine());
- if (statists > 150) {
- dresses *= 0.9;
- }
- double price = decors + statists * dresses;
- if (budget >= price) {
- System.out.printf("Action!\nWingard starts filming with %.2f leva left.\n", budget - price);
- } else {
- System.out.printf("Not enough money!\nWingard needs %.2f leva more.\n", price - budget);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement