Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class GodzillaVsKong {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double budget = Double.parseDouble(scanner.nextLine());
- int statists = Integer.parseInt(scanner.nextLine());
- double dresses = Double.parseDouble(scanner.nextLine());
- double decor = budget / 10;
- if (statists > 150) {
- dresses *= 0.9;
- }
- double price = decor + statists * dresses;
- if (budget >= price) {
- System.out.println("Action!");
- System.out.printf("Wingard starts filming with %.2f leva left.", budget - price);
- } else {
- System.out.println("Not enough money!");
- System.out.printf("Wingard needs %.2f leva more.", price - budget);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement