Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double filmBudget = Double.parseDouble(console.nextLine());
- int actorsCount = Integer.parseInt(console.nextLine());
- double priceForActorClothes = Double.parseDouble(console.nextLine());
- double decourPrice = filmBudget * 0.10;
- double clothesMoney = actorsCount * priceForActorClothes;
- double MovieBudget = decourPrice + clothesMoney;
- double moneyLeft = filmBudget - MovieBudget;
- double discount = 0.0;
- if (actorsCount <= 150){
- System.out.printf("Action!%nWingard starts filming with %.2f leva left.", moneyLeft);
- }
- else if (filmBudget < clothesMoney){
- System.out.printf("Not enough money!%nWingard needs %.2f leva more.", moneyLeft);
- }
- else if (actorsCount >= 150){
- discount = clothesMoney * 0.1 - clothesMoney;
- System.out.printf("Action!%nWingard starts filming with %.2f leva left.", moneyLeft);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment