Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Mess;
- import java.util.Scanner;
- public class Godzilla {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double movieBudget = Double.parseDouble(scanner.nextLine());
- int statistCount = Integer.parseInt(scanner.nextLine());
- double dressPrice = Double.parseDouble(scanner.nextLine());
- double sum = 0;
- double decor = movieBudget * 0.1;
- double dressTotal = statistCount * dressPrice;
- if (statistCount > 150) {
- dressTotal = dressTotal - (dressTotal * 0.10);
- }
- sum = decor + dressTotal;
- double diff = Math.abs(movieBudget - sum);
- if (movieBudget > sum) {
- System.out.println("Action!");
- System.out.printf("Wingard starts filming with %.2f leva left.",diff);
- }else {
- System.out.println("Not enough money!");
- System.out.printf("Wingard needs %.2f leva more.", diff);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement